]> nv-tegra.nvidia Code Review - linux-2.6.git/commit - drivers/scsi/sr.h
sr: implement sr_check_events()
authorTejun Heo <tj@kernel.org>
Thu, 16 Dec 2010 16:52:17 +0000 (17:52 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 16 Dec 2010 16:53:39 +0000 (17:53 +0100)
commit93aae17af1172c40c6f74b7294e93a90c3cfaa5d
tree1ad359eba862b56c106bca78d412293f34e3500d
parent9f8a2c23c6c1140f515f601265c4dff7522110b7
sr: implement sr_check_events()

Replace sr_media_change() with sr_check_events().  It normally only
uses GET_EVENT_STATUS_NOTIFICATION to check both media change and
eject request.  If @clearing includes DISK_EVENT_MEDIA_CHANGE, it
issues TUR and compares whether media presence has changed.  The SCSI
specific media change uevent is kept for compatibility.

sr_media_change() was doing both media change check and revalidation.
The revalidation part is split into sr_block_revalidate_disk().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/scsi/sr.c
drivers/scsi/sr.h
include/scsi/scsi.h