[Oneiric][SRU] Fix loop device notificaitons.

Ayan George ayan.george at canonical.com
Wed Jan 18 15:46:57 UTC 2012


SRU Justification:

Impact: The loop device does not emit a change uevent when autoreleasing
a device.  Programs that depend on uevents (like gvfs and ultimately
Nautilus) never notice when loop devices are unmounted.

Bug-Link: https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/548546

Fix: Apply 8a9c594422ecad912d6470888acdee9a1236ad68 from linux mainline
-- Pass a valid bdev pointer to loop_clr_fd() instead of NULL so that
it will emit the uevent.

The patch is very small and applies cleanly to ubuntu-oneiric.

Testcase:

(1) In a terminal, start udevadm in monitor mode:

  $ udevadm monitor

(2) In another terminal, mount an ISO image using the loopback device:

  $ sudo mount -o loop -t iso9660 your_image.iso /mnt

(3) Notice the change uevents that udevadm reports.

(4) Unmount image:

  $ sudo umount /mnt

(5) Note that udevadm does not report any changes.  With the patch
applied, you will see the kernel noticiations.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drivers-block-loop.c-emit-uevent-on-auto-release.patch
Type: text/x-patch
Size: 1128 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20120118/96f5d6e4/attachment.bin>


More information about the kernel-team mailing list