]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
ignore xenstore events while paused
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 4 Sep 2009 15:17:39 +0000 (16:17 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 4 Sep 2009 15:17:39 +0000 (16:17 +0100)
when qemu is paused it shouldn't try to handle xenstore events,
especially because when xend removes nodes on xenstore some
spurious events could be generated causing qemu to exit unexpectedly.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xenstore.c

index 8222df4ccf08dd2a4ff97d1178360eec70fe81e7..aee96f0fee41fcb2768778f996b91f62a7299c04 100644 (file)
@@ -921,6 +921,16 @@ void xenstore_process_event(void *opaque)
     if (!vec)
         return;
 
+    /* process dm-command events before everything else */
+    if (!strcmp(vec[XS_WATCH_TOKEN], "dm-command")) {
+        xenstore_process_dm_command_event();
+        goto out;
+    }
+
+    /* if we are paused don't process anything else */
+    if (xen_pause_requested)
+        goto out;
+
     for (i = 0; xenstore_watch_callbacks &&  xenstore_watch_callbacks[i].path; i++)
        if (xenstore_watch_callbacks[i].cb &&
            !strcmp(vec[XS_WATCH_TOKEN], xenstore_watch_callbacks[i].path))
@@ -932,11 +942,6 @@ void xenstore_process_event(void *opaque)
         goto out;
     }
 
-    if (!strcmp(vec[XS_WATCH_TOKEN], "dm-command")) {
-        xenstore_process_dm_command_event();
-        goto out;
-    }
-
     if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
         strlen(vec[XS_WATCH_TOKEN]) != 3)
         goto out;