Subject: Re: devfs, was Re: ptyfs fully working now...
To: None <tech-kern@NetBSD.org>
From: Chapman Flack <flack@cerias.purdue.edu>
List: tech-kern
Date: 11/18/2004 10:41:01
Eric Haszlakiewicz wrote:

> 	I was thinking that a better way to do this would be a devfs as a
> slightly twisted unionfs style layer. The changes in permissions (if any)
> would be stored in the filesystem as permissions on a symlink in the underlying
> filestore.  e.g.:
> 	Filestore         device       Visible
>     ----------        ------       -------
> foo -> .../dev/audio  audio        foo as an actual device node
> (nothing)             mixerctl     mixerctl as dev node
> fd0a -> .../deleted   fd0a         nothing visible
>   (or perhaps a whiteout)
> bar -> blah           (anything)   normal symlink to blah
> xxx -> .../dev/aaa    (no aaa)     normal symlink

I like this basic idea (whether the final representation details are exactly
as proposed here or evolve through more discussion).  After all, the basic
requirement here is for some sort of persistent database that records
associations from pathnames to ownership and status data, allows those data
to be updated and retained, and has provisions for update integrity and
recoverability.  We already have implementations of several databases that
have exactly those properties: FFS, EXT2FS, NTFS, etc., and the commands
used to update owners and modes in those kinds of databases are already really
familiar to everybody.

-Chap