[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Virtio-disk updates for latest Xen ?



On 07.12.22 01:21, Viresh Kumar wrote:
+list

On 06-12-22, 13:40, Oleksandr Tyshchenko wrote:
On Tue, Dec 6, 2022 at 1:15 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
Hi Oleksandr,
Hello Viresh

I found that my rust counterpart [1] of virtio-disk repository broke
with this commit:

commit 3a96013a3e17 ("tools/xenstore: reduce number of watch events")

And so was wondering if you have already fixed that for
virtio-disk or not. And I can just copy what you have changed :)


Interesting, I am not aware of that issue. I haven't tried virtio-disk with
recent (latest) Xen, I was mostly playing with Qemu backends. Thanks for
letting me know, I will re-check once I have access to my hardware again.

Hmm, moved a little closer :)

We look at the watch events here [2] one by one and wait for the
directory one to come ("backend/disk" in your case I think, it is
"backend/virtio" with my latest patches). This is the second directory
event which used to come after the directory is finalized.

Earlier the events were read for following paths:

"backend/virtio"
"backend/virtio/1/0"
"backend/virtio/1"
"backend/virtio"

and on the last event, we used to go ahead and look at the directory
to find the FE domid.

With the new changes, the events I am getting are:

[src/xs.rs:164] &name = "backend/virtio"
[src/xs.rs:164] &name = "backend/virtio/1/0"
[src/xs.rs:164] &name = "backend/virtio/1/0/frontend"
[src/xs.rs:164] &name = "backend/virtio/1/0/frontend-id"
[src/xs.rs:164] &name = "backend/virtio/1/0/online"
[src/xs.rs:164] &name = "backend/virtio/1/0/state"
[src/xs.rs:164] &name = "backend/virtio/1/0/irq"
[src/xs.rs:164] &name = "backend/virtio/1/0/base"
[src/xs.rs:164] &name = "backend/virtio/1/0/type"
[src/xs.rs:164] &name = "backend/virtio/1/0/transport"

Here the second event for "backend/virtio" never comes and so we fail.

Yes, this is by design.

Note that all Xenstore entries for a device are written via a transaction,
so there should be no way you can see any of the backend nodes missing when
receiving a watch for "backend/virtio/1/0" due to creation of the device.

In future we are even planning to support setting up Xenstore watches for
a limited path depth, resulting in only the "backend/virtio", "backend/virtio/1"
and "backend/virtio/1/0" watch events being sent (this example is for the
kernel, which will use the last event to extract all the needed information
from the reported path).


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.