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

From: Kay Sievers
Date: Tue Sep 14 2010 - 21:01:57 EST


On Wed, Sep 15, 2010 at 02:37, Maxim Levitsky <maximlevitsky@xxxxxxxxx> wrote:
> On Wed, 2010-09-15 at 01:49 +0200, Kay Sievers wrote:
>> On Wed, Sep 15, 2010 at 01:38, Maxim Levitsky <maximlevitsky@xxxxxxxxx> wrote:
>> > On Tue, 2010-09-14 at 10:07 +0200, Kay Sievers wrote:
>>
>> >> 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.
>> >
>> > Note that on current vanilla head, I applied the attached manual revert
>> > patch, and problem disappears (and probably introduces the same bug that
>> > patch supposed to fix).
>>
>> Can you please check which process polls the device, and attach an
>> strace to it, to see what's going on?
> As far as I can tell there is no such process.
> (at least sudo fuser /dev/sr0 doesn't show up anything with or without
> cd in the drive)
>>
>> If there is no such process, does "touch /dev/sr0" create the missing event?
> Yes.

Hmm, strange, I really have no idea why the old kernel works
differently for you.

The behavior you describe for the current kernel seems correct and is
the expected one. If there is nothing in userspace that polls
periodically, than we can't expect any event for a media change.

It's only the polling that should be able to trigger these events for
the device. the device itself can't report any changes to the host,
unless you have a SATA drive which can send AN (async notification)
events. But we disabled the AN support recently, because it was
running in loops on some boxes.

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/