From: David Zeuthen Date: Mon, 3 May 2010 12:08:59 +0000 (+0200) Subject: generate "change" uevent for loop device X-Git-Tag: v2.6.35-rc1~459^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3473c63542d53740f175f3a515257ae159e998b;p=pandora-kernel.git generate "change" uevent for loop device Recent udev versions probe loop devices for filesystems meaning that the /dev/disk hierarchy may contain useful entries such as $ ls -l /dev/disk/by-label/Fedora-12-x86_64-Live lrwxrwxrwx 1 root root 11 Mar 11 13:41 /dev/disk/by-label/Fedora-12-x86_64-Live -> ../../loop0 Unfortunately, no "change" uevent is generated when the loop device is detached so the symlink persists. Additionally, no "change" uevent is guaranteed to be generated when attaching an fd or changing capacity. For example, user space could open the loop device O_RDONLY (in fact, recent util-linux-ng does this) so udev's OPTIONS+="watch" machinery may not trigger the "change" uevent. This patch ensures that the "change" uevent is generated in all of these cases. As a result, the /dev/disk hierarchy works as expected for loop devices. Signed-off-by: David Zeuthen Acked-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed