Re: removable media revalidation - udev vs. devfs or static /dev

From: Jens Axboe
Date: Wed Jan 07 2004 - 06:07:33 EST


On Wed, Jan 07 2004, Andrey Borzenkov wrote:
> On Wednesday 07 January 2004 12:50, Jens Axboe wrote:
> > > > So yeah, poll...
> > >
> > > Poll how? "kmediachangethread"? Or polling in userland? The latter would
> > > (probably) lead to endless IO errors. Not very good.
> >
> > No need to put it in the kernel, user space fits the bil nicely.
>
> unfortunately opening device in userland effectively locks tray making
> media change impossible. at least given current ->open semantic.
>
> even periodic access is quite annoying for users (tray closing while
> user attempts to insert CD)

cdrom layer handles this with O_NONBLOCK basically meaning a 'not for
data' open.

> we may agree that O_NDELAY does not affect locked state; currently
> this is not consistent across drivers (e.g. cdrom does not lock tray
> while sd does)

cdrom has no special O_NDELAY checks.

--
Jens Axboe

-
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/