[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [patch] loopback block device confliction is fixed.
Hi. Sorry. My past patch cannot solve confliction problems, but can decrease its occurrence. And, when loopback devices mounted become fragment, sharing cannot checked for all loopback devices. Therefore, I create new patch. This patch is to stock candidate devices at first stage ( searching and sharing check stage), and to try to assign loopback devices within candidate devise gradually. Thanks Satoshi UCHIDA diff -r 243265ade404 tools/examples/block --- a/tools/examples/block Mon Nov 28 17:22:02 2005 +++ b/tools/examples/block Wed Nov 30 15:08:26 2005 @@ -202,7 +202,7 @@ mount it read-write in a guest domain." fi - loopdev='' + loopdevs='' for dev in /dev/loop* do @@ -235,26 +235,26 @@ # $dev is not in use, so we'll remember it for use later; we want # to finish the sharing check first. - if [ "$loopdev" == '' ] - then - loopdev="$dev" - fi + loopdevs="$loopdevs $dev" fi done - if [ "$loopdev" == '' ] + if [ "$loopdevs" == '' ] then fatal 'Failed to find an unused loop device' fi - if losetup "$loopdev" "$file" - then - xenstore_write "$XENBUS_PATH/node" "$loopdev" - write_dev "$loopdev" - exit 0 - else - fatal "losetup $loopdev $file failed" - fi + for loopdev in $loopdevs + do + if losetup "$loopdev" "$file" + then + xenstore_write "$XENBUS_PATH/node" "$loopdev" + write_dev "$loopdev" + exit 0 + fi + done + + fatal "losetup $loopdev $file failed" ;; esac ;; Attachment:
block.patch-new _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |