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

Andries Brouwer
2004-01-08T03:35:20Z

On Wed, Jan 07, 2004 at 06:56:30PM -0800, Linus Torvalds wrote:

> > > When I insert a card in my card reader, it had better "just work". WITHOUT
> > > any strange "poll another device Y to make device X" work.
> >
> > But it does just work.
> >
> > Already today.
>
> Exactly. It works today, because:
>
> - the device nodes are there.
>
> Ergo: udev should create the device nodes
>
> - the kernel autopartitions the device on any open (both main device and
> the subpartitions) when it notices a changed media. No polling
> required.
>
> Ergo: the kernel should continue to do this.
>
> We should _not_ be in the situation where either of these things aren't
> true.

Indeed.

I am even happy in a somewhat more general situation that you are.
If the kernel autopartitions (and make recognition of new partitions
hotplug events so that udev can create the device nodes), all is well.

On the other hand, if the kernel does not autopartition
(for example because I had not selected CONFIG_MAC_PARTITION
and put a Mac disk in my ZIP drive) then all is still well
since user space can tell the kernel about the partitions
it sees on this Mac disk. Of course these partitions that
userspace tells the kernel about must also lead to hotplug
events.

Andries