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

Greg KH
2004-01-07T18:58:15Z

On Wed, Jan 07, 2004 at 10:38:31AM -0800, Linus Torvalds wrote:
>
> On Fri, 2 Jan 2004, Greg KH wrote:
> >
> > Doesn't the kernel always create the main block device for this device?
> > If so, udev will catch that.
>
> But udev should probably also create all the sub-nodes if it doesn't
> already.

It doesn't, as I thought we could rely on the kernel partition support.

> And it really has to create _all_ of them, exactly because there's no way
> to know ahead-of-time which of them will be available.
>
> Then, user space can just access "/dev/sda1" or whatever, and the act of
> accessing it will force the re-scan.

Hm, that would work, but what about a user program that just polls on
the device, as the rest of this thread discusses? As removable devices
are not the "norm" it would seem a bit of overkill to create 16
partitions for every block device, if they need them or not.

thanks,

greg k-h