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

From: Olaf Hering
Date: Wed Jan 07 2004 - 15:54:13 EST


On Wed, Jan 07, 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.
>
> 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.

How would that work? I mean, what will a tool that cares about a block
event do? It will run a fdisk/parted -l /udev/sda to figure out what partitions
are there (just to skip an extended partition sda5, as example) and
finds no media. That tool will never run again on sda, unless a new
block add event comes in. So some sort of polling is required for that
class of devices.

If we create sda1 - sda15, you mean a mount /udev/sda15 /mnt is supposed
to fail with -ENODEV instead of -ENOENT?

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÃRNBERG
-
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/