Index: xen-unstable/tools/examples/block =================================================================== --- xen-unstable.orig/tools/examples/block +++ xen-unstable/tools/examples/block @@ -391,8 +391,18 @@ mount it read-write in a guest domain." 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 ;; "")