Re: devfs

James Mastros (root@jennifer-unix.dyn.ml.org)
Thu, 8 Jan 1998 18:48:14 -0500 (EST)


On Thu, 8 Jan 1998, Alan Cox wrote:
> > The FSSTND (Linux filesystem standard document) suggests the possibility
> > of a read-only root filesystem. [...] With the
> > devfs, the root filesystem can be read-only. The current /dev could be
> > trouble for Linux embedded in ROM.
>
> Firstly. The fsstnd does not say /dev has to reamin on the root fs. Its also
> not really an issue for a ROM based Linux - you tend to unpack a compressed
> image from expensive slow flash into cheap ramdisk
But if it isn't you can't mount /dev; for device mounts, mount needs to
access a node. (Devfs, proc, smb, nfs, etc can be -- there is no file (or
node) in the fs that is being mounted.)

> > With devfs, the kernel can chown ptys back to root when a process
> > does not need them anymore. The kernel might be able to let normal
> > users chown their own pty or it might perform the chown automatically.
>
> This solvable in user space by having a single pty allocation daemon. The
> tty/pty issue is irrelevant the wisdom or otherwise of a devfs.

Umm... but which is the cleaner interface? I think that devfs is; you may
think that a ptyd is. I think that there are already to many daemons.
Also, the daemon wouldn't know when the pty should revert back to root
ownership without kernel modifications anyway.

> Alan

-=- James Mastros

-- 
  Agent K: A person is smart; people are dumb, panicky animals and you know
   it. Fifteen hundred years ago, everybody knew that the Earth was the
   center of the Universe.  Five hundred years ago, everybody knew that the
   Earth was flat.  Fifteen minutes ago, you knew that humans were alone on
   this planet.  Just think what you'll know tomorrow.

-=- Men In Black (1997, Paramount)