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

Re: [Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnect

To: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnected at removal
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 22 Sep 2011 14:28:15 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 22 Sep 2011 06:28:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1d3830f8a7306088b49d.1316692869@loki>
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>
Organization: Citrix Systems, Inc.
References: <patchbomb.1316692867@loki> <1d3830f8a7306088b49d.1316692869@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-09-22 at 13:01 +0100, Roger Pau Monne wrote:
> # 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>

Whitespace looks a bit screwed up. (Fair enough it already was but lets
not make things worse.

So:
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

but with the proviso that the following is subsequently applied too:

8<------------------------------------------------------------------

Subject: hotplug: s/^I/        / in block hotplug script

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r e077264006c5 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Thu Sep 22 14:25:59 2011 +0100
+++ b/tools/hotplug/Linux/block Thu Sep 22 14:26:41 2011 +0100
@@ -239,10 +239,10 @@ case "$command" in
 
         claim_lock "block"
         check_device_sharing "$dev" "$mode"
-       write_dev "$dev"
+        write_dev "$dev"
         release_lock "block"
-       exit 0
-       ;;
+        exit 0
+        ;;
 
       file)
         # Canonicalise the file, for sharing check comparison, and the mode
@@ -254,7 +254,7 @@ case "$command" in
         claim_lock "block"
 
         # Avoid a race with the remove if the path has been deleted, or
-       # otherwise changed from "InitWait" state e.g. due to a timeout
+        # otherwise changed from "InitWait" state e.g. due to a timeout
         xenbus_state=$(xenstore_read_default "$XENBUS_PATH/state" 'unknown')
         if [ "$xenbus_state" != '2' ]
         then
@@ -308,35 +308,35 @@ mount it read-write in a guest domain."
         write_dev "$loopdev"
         release_lock "block"
         exit 0
-       ;;
+        ;;
 
       "")
         claim_lock "block"
         success
         release_lock "block"
-       ;;
+        ;;
     esac
     ;;
 
   remove)
     case $t in 
       phy)
-               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
-       exit 0
-       ;;
+        xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
+        exit 0
+        ;;
 
       file)
         claim_lock "block"
         node=$(xenstore_read "$XENBUS_PATH/node")
-       losetup -d "$node"
+        losetup -d "$node"
         release_lock "block"
-               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
-       exit 0
-       ;;
+        xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
+        exit 0
+        ;;
 
       "")
         exit 0
-       ;;
+        ;;
     esac
     ;;
 



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