Re: devfs again, (was RE: USB device allocation)

Dan Hollis (goemon@sasami.anime.net)
Fri, 8 Oct 1999 14:50:01 -0700 (PDT)


On Fri, 8 Oct 1999, Stephen Frost wrote:
> On Fri, 8 Oct 1999, Dan Hollis wrote:
> > On Fri, 8 Oct 1999, Stephen Frost wrote:
> > > > Im a devfs advocate but I agree the symlink design is bad.
> > > > Would an overmountable devfs address most of the arguments against it?
> > > Not sure... Could you elaborate on what you mean by 'overmountable'?
> > I guess the better term is "Union fs".
> The idea being that devfs and /dev (on the disk) are one and the same
> and the kernel is happily off making changes to files on the disk when a device
> is added or removed? That and devfs catches the 'open' call to determine what
> device to talk to?

Sort of. devfs wouldnt actually make any files on disk -- overmounting
would only be used for permissions persistence. That is, any file which
devfs creates is virtual *unless* someone changes permissions on it. Then
its written to disk. devfs would use the existing permissions if the file
already exists on disk when devfs is mounted.

This way, if the end user never changes permissions, nothing ever touches
the disk. Think read-only filesystems, or filesystems without 'device
file' semantics (ntfs, etc.)

The alternative way would be to use the "devices.permissions" file as I
stated in another email. When mounting /dev the kernel opens
/dev/devices.permissions before placing the file over the mount point. It
uses that file to store persistence information. This could be overridden
with a kernel option or mount option to tell it not to store persistent
information (for e.g. rom filesystems).

The kernel already does something like this for quotas, doesnt it?

-Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/