OpenCloudOS-Kernel/drivers/block
David Zeuthen c3473c6354 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 <davidz@redhat.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-21 09:37:30 -07:00
..
aoe include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
drbd drbd: don't expose failed local READ to upper layers 2010-05-03 22:40:16 +02:00
paride Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-04-09 11:50:29 -07:00
DAC960.c block: Finalize conversion of block limits functions 2010-03-15 12:47:59 +01:00
DAC960.h Fix DAC960 driver on machines which don't support 64-bit DMA 2007-09-11 17:21:19 -07:00
Kconfig The DRBD driver 2009-10-01 21:17:49 +02:00
Makefile The DRBD driver 2009-10-01 21:17:49 +02:00
amiflop.c m68k: amiga - Floppy platform device conversion 2010-05-17 21:37:45 +02:00
ataflop.c ataflop: Killl warning about unused variable flags 2010-02-27 18:27:15 +01:00
brd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cciss.c cciss: fix shadows sparse warning 2010-05-11 09:59:26 +02:00
cciss.h cciss: do not use void pointer for scsi hba data 2010-02-28 19:42:32 +01:00
cciss_cmd.h cciss: detect bad alignment of scsi commands at build time 2010-02-28 19:42:31 +01:00
cciss_scsi.c cciss: Fix problem with scatter gather elements in the scsi half of the driver 2010-02-28 19:42:32 +01:00
cciss_scsi.h cciss: remove C99-style comments 2010-02-22 13:44:45 +01:00
cpqarray.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
cpqarray.h
cryptoloop.c drivers: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:32 -04:00
floppy.c drivers/block/floppy.c: remove unnecessary casting in fd_ioctl 2010-03-12 15:52:31 -08:00
hd.c Merge commit 'v2.6.34-rc6' into core/locking 2010-05-03 09:17:01 +02:00
ida_cmd.h
ida_ioctl.h
loop.c generate "change" uevent for loop device 2010-05-21 09:37:30 -07:00
mg_disk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nbd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
osdblk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pktcdvd.c pktcdvd: improve BKL and compat_ioctl.c usage 2010-04-29 08:44:37 -07:00
ps3disk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ps3vram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
smart1,2.h
sunvdc.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
swim.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
swim3.c powerpc/macio: Rework hotplug media bay support 2009-12-09 17:09:14 +11:00
swim_asm.S m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
sx8.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
ub.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
umem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
umem.h drivers/block/umem: trim trailing whitespace 2007-10-10 09:25:59 +02:00
viodasd.c Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
virtio_blk.c Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-04-09 11:50:29 -07:00
xd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xd.h [PATCH] switch xd 2008-10-21 07:48:11 -04:00
xen-blkfront.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xsysace.c block: make Open Firmware device id constant 2010-01-11 14:31:27 +01:00
z2ram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00