|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnect
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
|
|
|
|
|