WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] qemu: ignore xenstore events while paused

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] qemu: ignore xenstore events while paused
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 17 Aug 2009 17:34:19 +0100
Delivery-date: Mon, 17 Aug 2009 09:32:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
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@xxxxxxxxxxxxx>

---

diff --git a/xenstore.c b/xenstore.c
index 8222df4..aee96f0 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -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;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] qemu: ignore xenstore events while paused, Stefano Stabellini <=