2007-02-11 11:48:10 +01:00
|
|
|
Index: xen-3.0.4-testing/tools/examples/block
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2007-02-11 11:48:10 +01:00
|
|
|
--- xen-3.0.4-testing.orig/tools/examples/block
|
|
|
|
+++ xen-3.0.4-testing/tools/examples/block
|
|
|
|
@@ -390,8 +390,18 @@ mount it read-write in a guest domain."
|
2007-01-16 00:42:10 +01:00
|
|
|
|
|
|
|
file)
|
|
|
|
node=$(xenstore_read "$XENBUS_PATH/node")
|
|
|
|
- losetup -d "$node"
|
|
|
|
- exit 0
|
|
|
|
+
|
|
|
|
+ #In case the loopback is temporarily blocked, retry the losetup -d.
|
|
|
|
+ for i in 1 2 3 4 5
|
|
|
|
+ do
|
|
|
|
+ if losetup -d "$node"
|
|
|
|
+ then
|
|
|
|
+ exit 0
|
|
|
|
+ fi
|
|
|
|
+ sleep 1
|
|
|
|
+ done
|
|
|
|
+ log err "losetup -d $node failed."
|
|
|
|
+ exit 1
|
|
|
|
;;
|
|
|
|
|
|
|
|
"")
|