WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hotplug: fix busy loop device detection

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hotplug: fix busy loop device detection
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 21 May 2011 19:15:11 +0100
Delivery-date: Sat, 21 May 2011 11:15:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305911366 -3600
# Node ID 3b912eb3c6eb5a4fa30f9367ac3b33575de803e7
# Parent  a3118a249ea37cdabbf943507a86d995944ac4ce
hotplug: fix busy loop device detection

Improve busy loop device detection after changeset 22773:02c0af2bf280

The intention is not to find the file to be mounted in the losetup -a
output.  What matters are existing mounted files with the same dev:inode
as the new file.  So the fix is to apply variable expansion which
happens only without double quotes.  Otherwise $dev will contain
newlines for hardlinked files, as mentioned in the commit message from
the changeset above.

losetup -a does also truncate long filenames to 62 chars due to ioctl
limitations.  This part is fixed with 2.6.37 where the filename can be
obtained from sysfs. As a result very long filenames will be missed.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r a3118a249ea3 -r 3b912eb3c6eb tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Fri May 20 16:11:13 2011 +0100
+++ b/tools/hotplug/Linux/block Fri May 20 18:09:26 2011 +0100
@@ -280,8 +280,8 @@
           fi
 
           shared_list=$(losetup -a |
-                sed -n -e 
"s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](${file})\)@\1@p" )
-          for dev in "$shared_list"
+                sed -n -e 
"s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
+          for dev in $shared_list
           do
             if [ -n "$dev" ]
             then

_______________________________________________
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] hotplug: fix busy loop device detection, Xen patchbot-unstable <=