]> git.karo-electronics.de Git - karo-tx-linux.git/commit
block: don't block events on excl write for non-optical devices
authorTejun Heo <tj@kernel.org>
Thu, 21 Apr 2011 18:54:46 +0000 (20:54 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:32:50 +0000 (09:32 +0900)
commit9a18274e9444e3581a6ba7479ddad080d1be63c0
tree6996e2e3f11b5402f8051f740c351e8f8947c7ce
parent86bc85941ec3dff36ba442f181e5d7e28ac7e2f7
block: don't block events on excl write for non-optical devices

commit d4dc210f69bcb0b4bef5a83b1c323817be89bad1 upstream.

Disk event code automatically blocks events on excl write.  This is
primarily to avoid issuing polling commands while burning is in
progress.  This behavior doesn't fit other types of devices with
removeable media where polling commands don't have adverse side
effects and door locking usually doesn't exist.

This patch introduces new genhd flag which controls the auto-blocking
behavior and uses it to enable auto-blocking only on optical devices.

Note for stable: 2.6.38 and later only

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/paride/pcd.c
drivers/cdrom/viocd.c
drivers/ide/ide-cd.c
drivers/scsi/sr.c
fs/block_dev.c
include/linux/genhd.h