Re: [REGRESSION] cdrom drive doesn't detect removal

From: Kay Sievers
Date: Tue Sep 14 2010 - 04:08:17 EST


On Tue, Sep 14, 2010 at 09:39, Tejun Heo <tj@xxxxxxxxxx> wrote:
> On 09/14/2010 03:27 AM, Maxim Levitsky wrote:
>>> However 2.6.36 doesn't detect that removal.
>>> According to udevadm monitor --property no uevents are send on removal.
>> Correction, this is regression between 2.6.34 and 2.6.35. This shows how
>> much I use cd these days...
>>
>> I bisected it down to this:
>>
>> 6b4517a7913a09d3259bb1d21c9cb300f12294bd is the first bad commit
>> commit 6b4517a7913a09d3259bb1d21c9cb300f12294bd
>> Author: Tejun Heo <tj@xxxxxxxxxx>
>> Date: Â Wed Apr 7 18:53:59 2010 +0900
>>
>> Â Â block: implement bd_claiming and claiming block
>
> Hmmm... weird. ÂThis commit does change the open behavior but
> shouldn't change the end result. ÂCan someone please enlighten me how
> udevadm is interacting with the device at system call level?

Not at all. Udev does not really touch it.

The cdrom drive isn't unlocked on usual systems, udisks polls the
cdrom drive periodically just like HAL did. The only difference is
that with the polling, the sr driver detects a media change and sends
a uevent to udev, instead of HAL looking at the result of the open().

Are we sure, that there is something that still polls the drive?
Udisks is only auto-started, when the desktop calls into some D-Bus
methods, unlike HAL where it was an init script.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/