]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event
authorTejun Heo <tj@kernel.org>
Tue, 28 Dec 2010 15:20:47 +0000 (16:20 +0100)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 4 Jan 2011 23:53:50 +0000 (17:53 -0600)
commitb939823d8a0e08b83dfd8be5f9dada8fd3ac01e6
tree4882cb80274b80345bc99cf2476f91fbac550a0a
parent038dab55f2862acf74a0930a0a41da807e506119
[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event

SDEV_MEDIA_CHANGE event was first added by commit b0d11ab2 (SCSI: add
asynchronous event notification API) for SATA AN support and then
extended to cover generic media change events by commit 354d347a
([SCSI] sr,sd: send media state change modification events).

This event was mapped to block device in userland with all properties
stripped to simulate CHANGE event on the block device, which, in turn,
was used to trigger further userspace action on media change.

The recent addition of disk event framework kept this event for
backward compatibility but it turns out to be unnecessary and causes
erratic and inefficient behavior.  The new disk event generates proper
events on the block devices and the compat events are mapped to block
device with all properties stripped, so the block device ends up
generating multiple duplicate events for single actual event.

This patch removes the compat event generation from both sr and sd as
suggested by Kay Sievers.  Both existing and newer versions of udev
and the associated tools will behave better with the removal of these
events as they from the beginning were expecting events on the block
devices.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/sd.c
drivers/scsi/sr.c