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

Re: Virtio-disk updates for latest Xen ?





On 07.12.22 05:59, Viresh Kumar wrote:

Hello Viresh

First of all, sorry for the late response.
The second, thank you for the investigation.


On 07-12-22, 05:51, Viresh Kumar wrote:
I am not sure how to get this working, as there is no finalizing event
for the directory. Maybe our design is broken from the start and we
need to do it properly in some recommended way ?

For now this is what I have done to make it work:

diff --git a/xs_dev.c b/xs_dev.c
index a6c8403cfe84..4643394a52a2 100755
--- a/xs_dev.c
+++ b/xs_dev.c
@@ -413,20 +413,7 @@ static int xenstore_get_fe_domid(struct xs_dev *dev)
static int xenstore_poll_be_watch(struct xs_dev *dev)
  {
-    unsigned int num;
-    char **vec;
-    int rc = 0;
-
-    vec = xs_read_watch(dev->xsh, &num);
-    if (!vec)
-        return -1;
-
-    if (!strcmp(vec[XS_WATCH_PATH], dev->path))
-        rc = xenstore_get_fe_domid(dev);
-
-    free(vec);
-
-    return rc;
+    return xenstore_get_fe_domid(dev);
  }

This rns xenstore_get_fe_domid() for each event in the path
"backend/virtio", and in my case it passes with the second event
itself, which came for "backend/virtio/1/0" and this code doesn't run
after that.

Note that I have tested this with my rust counterpart which received a
similar change, I didn't test virtio-disk directly.


Today I had a chance to check virtio-disk on my H/W using new Xen branch which does include Juergen's series with commit 3a96013a3e17 ("tools/xenstore: reduce number of watch events").

Very interesting, but I didn't manage to reproduce an issue the similar to what you had already faced with the rust counterparts before (caused by the lack of Xenstore watches?). Note that I didn't debug what exactly events I had got during guest creation/destruction, I just made sure that backend worked as before. I checked that by running the backend in Dom0 and DomD and performed a couple of guest power cycles (reboot, destroy/create).

If you could provide the debug patch which you seem to use to print incoming events which you described in previous email, I think I would be able to re-check the situation at my side more deeper.



 


Rackspace

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