Up to and including 2.6.39-rc7, the root user can mount a floppy in a standard PC floppy drive by issuing "mount /dev/fd0 /mnt/floppy". An ordinary user cannot do this (even with a fstab mount entry) due to bug #28522. Starting with 2.6.39, if root tries to do the same operation, this is the output: [root@karlalex ~]# mount /dev/fd0 /mnt/floppy/ mount: /dev/fd0 is not a valid block device No I/O is ever attempted on the floppy drive. To reproduce: 1) Boot 2.6.39 in x86_64 machine with a standard floppy drive (not USB, not parport) and no floppy inserted in the drive. 2) After boot finishes, insert floppy in drive 3) Attempt (as root) to mount the floppy. Actual results: mount: /dev/fd0 is not a valid block device No I/O attempted on drive. Expected results: Mount should be successful, or at least I/O should be attempted on the drive. Any attempt to access /dev/fd0 (such as dd) is affected in the same way. A strace on mount shows that the open() operation on /dev/fd0 fails with ENXIO, as well as the actual mount() operation. Bisection on this bug points to the following commit: commit 9fd097b14918875bd6f125ed699d7bbbba5893ee Author: Tejun Heo <tj@kernel.org> Date: Thu Apr 21 21:32:55 2011 +0200 block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers In-kernel disk event polling doesn't matter for legacy/fringe drivers and may lead to infinite event loop if ->check_events() implementation generates events on level condition instead of edge. Now that block layer supports suppressing exporting unlisted events, simply leaving disk->events cleared allows these drivers to keep the internal revalidation behavior intact while avoiding weird interactions with userland event handler. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Reverting this particular commit fixes the bug for me.
Created attachment 59462 [details] dont-check-events-on-disk_add_events.patch Can you please test this patch? Thanks.
First-Bad-Commit : 9fd097b14918875bd6f125ed699d7bbbba5893ee
The patch dont-check-events-on-disk_add_events.patch indeed fixes the bug.
There is now a serious problem when mounting /dev/fd0u1440 in 3.0.0-rc1, described at bug #28522.
Patch: https://bugzilla.kernel.org/attachment.cgi?id=59462
Merged in 3.0-rc2: commit 75e3f3ee3c64968d42f4843ec49e579f84b5aa0c Author: Tejun Heo <tj@kernel.org> Date: Thu May 26 21:06:50 2011 +0200 block: always allocate genhd->ev if check_events is implemented