|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] tools/hotplug/Linux: allow hardlinked fil
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1295287552 0
# Node ID 02c0af2bf280e37c891e1ac9c5b6baa5799527cb
# Parent 654563af359ff8287419ee4f5248f236565542d1
tools/hotplug/Linux: allow hardlinked files for block device images
tools/hotplug/Linux/block change for this losetup -a output:
(inode 12 is listed twice due to hardlinks)
/dev/loop0: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop1: [0809]:139266 (/abuild/vdisk-sles11_1-disk1)
/dev/loop3: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop5: [0809]:139273 (/abuild/vdisk-sles11_5-disk1)
/dev/loop8: [0809]:12 (/abuild/bootiso-xenpaging-sles11_5.iso)
/dev/loop10: [0809]:12 (/abuild/bootiso-xenpaging-sles11_4.iso)
/dev/loop11: [0809]:139271 (/abuild/vdisk-sles11_4-disk0)
Without this change, $dev would contain /dev/loop8\n/dev/loop10
Applies to 4.0 and 4.1
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
tools/hotplug/Linux/block | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -r 654563af359f -r 02c0af2bf280 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Mon Jan 17 17:55:12 2011 +0000
+++ b/tools/hotplug/Linux/block Mon Jan 17 18:05:52 2011 +0000
@@ -279,8 +279,8 @@ mount it read-write in a guest domain."
fatal "Unable to lookup $file: dev: $dev inode: $inode"
fi
- shared_list=$(losetup -a | grep ' \[0*'${dev}'\]:'${inode} |
- cut -d : -f 1)
+ shared_list=$(losetup -a |
+ sed -n -e
"s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](${file})\)@\1@p" )
for dev in "$shared_list"
do
if [ -n "$dev" ]
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] tools/hotplug/Linux: allow hardlinked files for block device images,
Xen patchbot-unstable <=
|
|
|
|
|