Messages in this thread | | | From | Kay Sievers <> | Date | Wed, 15 Sep 2010 15:44:48 +0200 | Subject | Re: [REGRESSION] cdrom drive doesn't detect removal |
| |
On Wed, Sep 15, 2010 at 15:27, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote: > On Wed, 15 Sep 2010, Kay Sievers wrote: >> 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. > > Is it so widespread or extremely difficult to detect, that it justifies > breaking AN for all users?
Yes. It's not properly implemented, and many drives just always send an event on access, regardless if the media is changed or not. To work properly, it will need in-kernel media presence polling, which is being worked on. The current AN events, the stuff the drives send, and the way it is handled in the kernel, is just not usable.
> Anyway, if userspace thinks AN is available, it won't pool or touch > /dev/sr*, which would explain the problem (but one still would have to find > the root cause: why userspace thinks it doesn't need to pool?).
There is no userspace checking for AN support right now. It wouldn't work anyway. And the only thing that makes sense is to move the polling in the kernel regardless of AN support or not, and make userspace check for that and skip polling when the kernel takes care.
Kay
| |