Subject: Re: Work-in-progress "wedges" implementation
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 10/09/2004 20:41:04
> Well, you can't have both a file called "sd0" and a directory called
> "sd0" in the same place...

Actually, you can, or something very much like it.

I spent the second half of 2002 doing filesystem work in the NetBSD
kernel.  Among othe things, the filesystem I ended up building had
filesystem entities that, when named directly, worked like files, but
when named with a following slash, worked like directories.  If the
filesystem is mounted on /mnt, for excample, /mnt/foo/bar might be a
file but /mnt/foo/bar/baz something else (and /mnt/foo/bar/. a
directory).

It would take only a very slight change to allow it to present (say)
/dev/sd0 as a device but still have /dev/sd0/wedge1 exist and work.
All that's needed is for the lookup routine to pay attention to the "is
this the last component" flag.

Whether you'd actually _want_ that for /dev/sd0, of course, is a
completely separate issue, as is how such a thing would be represented
in any kind of permanent storage that may be associated with it.  I
merely point out that it is possible to do.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B