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-changelog

[Xen-changelog] [qemu-xen-unstable] xs_rm xenstore command from xend aft

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] xs_rm xenstore command from xend after we read it
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Mon, 29 Jun 2009 03:00:17 -0700
Delivery-date: Mon, 29 Jun 2009 03:00:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 2b3cd7ff7af0fff9314abae999e0e67c21041ffc
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Thu Jun 18 14:53:58 2009 +0100

    xs_rm xenstore command from xend after we read it
    
    in xenstore_process_dm_command_event(), xs_rm the
    command node after we read it.
    
    As Ian Jackson pointed out: "when we start processing a command we
    should delete it from xenstore immediately, so that future watch
    triggerings either don't see the command or actually see genuine new
    invocations".
    
    The patch is used to overcome a race condition that occurs after
    changeset 19679: ec2bc4b9fa32 (xend: hot-plug PCI devices at
    boot-time) and could break the device assignment of hvm guest:
    
    ioemu's xs_watch() fires the 'command' for the 1st time and xend's
    signalDeviceModel('pci-ins',...) fires it for the 2nd time -- without
    the patch, the 2nd time watch handling would try to invoke
    xenstore_process_dm_command_event() again and since the 'parameter'
    node has been changed to hold vslot by ioemu, the second time would
    fail and set 'parameter' to "no free hotplug slots" at the end of the
    2nd handling; and, if xend runs slower, xend would treat the
    'parameter' of the 2nd time as that of the 1st time and destroy the
    guest.
    
    Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xenstore.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index d2f38d2..0618c80 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -756,6 +756,9 @@ static void xenstore_process_dm_command_event(void)
     if (!command)
         goto out;
     
+    if (!xs_rm(xsh, XBT_NULL, path))
+        fprintf(logfile, "xs_rm failed: path=%s\n", path);
+
     if (!strncmp(command, "save", len)) {
         fprintf(logfile, "dm-command: pause and save state\n");
         xen_pause_requested = 1;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] xs_rm xenstore command from xend after we read it, Ian Jackson <=