On Tue, Dec 28, 2010 at 16:20, Tejun Heo <tj@xxxxxxxxxx> wrote: > SDEV_MEDIA_CHANGE event was first added by commit a341cd0f (SCSI: add > asynchronous event notification API) for SATA AN support and then > extended to cover generic media change events by commit 285e9670 > ([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@xxxxxxxxxx> > Cc: Kay Sievers <kay.sievers@xxxxxxxx> > Cc: Jens Axboe <axboe@xxxxxxxxx> > Cc: Jeff Garzik <jgarzik@xxxxxxxxxx> Here's my: Tested-By: Kay Sievers <kay.sievers@xxxxxxxx> Works fine for me with udev/udisks. Udev uses a rule to "forward" the SCSI events to the block device, and fake an event there. Now that we have the events proper from the device itself, where they belong to, we can stop doing such weird hacks. I'm happy to see that mess cleaned up. Thanks a lot for doing all that! Kay -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html