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

[Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnected at removal



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1316692482 -7200
# Node ID 1d3830f8a7306088b49d5732b5e88a73c2bc0315
# Parent  576c0ce336acb501cbba245dc801f06edc391479
hotplug: set hotplug-status to disconnected at removal

Set the hotplug-status attribute of xenstore to disconnected when the hotplug 
block script has finished disconnecting the device

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 576c0ce336ac -r 1d3830f8a730 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Thu Sep 22 13:54:35 2011 +0200
+++ b/tools/hotplug/Linux/block Thu Sep 22 13:54:42 2011 +0200
@@ -321,6 +321,7 @@ mount it read-write in a guest domain."
   remove)
     case $t in 
       phy)
+               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
        exit 0
        ;;
 
@@ -329,6 +330,7 @@ mount it read-write in a guest domain."
         node=$(xenstore_read "$XENBUS_PATH/node")
        losetup -d "$node"
         release_lock "block"
+               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
        exit 0
        ;;
 
diff -r 576c0ce336ac -r 1d3830f8a730 tools/hotplug/NetBSD/block
--- a/tools/hotplug/NetBSD/block        Thu Sep 22 13:54:35 2011 +0200
+++ b/tools/hotplug/NetBSD/block        Thu Sep 22 13:54:42 2011 +0200
@@ -38,6 +38,7 @@ 6)
                echo "unknown type $xtype" >&2
                ;;
        esac
+       xenstore-write $xpath/hotplug-status disconnected
        xenstore-rm $xpath
        exit 0
        ;;

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


 


Rackspace

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