Subject: Re: how to name fs specific programs
To: Curt Sampson <cjs@portal.ca>
From: Terry Lambert <terry@lambert.org>
List: port-i386
Date: 03/26/1997 14:13:28
> > ...and he believes that the name
> > of the filesystem type should be defined purely by the name used in
> > the /sbin/fs directory, and not by anything inherent in the binaries
> > found inside /sbin/fs/foo/.
> 
> In other words, one wants /sbin/nfs/mount, and /sbin/nfs/nfsmount
> is wrong because the word `nfs' appears in the files under /sbin/nfs?
> 
> I can't see what advantage this offers besides aesthetic. Certainly
> the code doesn't care whether or not there's an _ or a / between
> the two %s strings in the printf format.

It doesn't make a lot of difference, unless you decide to replace the
agregation (generic) "mount" command with an FS specific "mount" command
at boot time.  If you do that, then it's possible that the names won't
match like you expect them to, and you won't find "/sbin/nfsmount" when
you are looking for "/sbin/mount".


> It does seem to me to be a disadvantage in that if the file is ever
> encountered outside of the tree (say, you restore a single file
> from backup) it's very easy to get confused as to which mount
> program it is.

Well, I can't speak for a restore of a partial directory tree into
a place other than the one written on the tape label... 8-).

But the ability to replace the "generic" (agregating) commands with
an FS specific command at varios stages of the boot is valuable to
replacing existing kernels on non-BS systems with your BSD kernel,
and having things "just work".  It's an important factor if you
ever want to pursue the "competitive upgrade" market with BSD kernels
replacing the native kernels for the OS installed on the machine.

This is the same issue as a device file system, since it allows you
to replace the system device nodes with your own without having to
destroy/disable the native devices, and without worrying about device
major number differences/conflicts.  A devfs also has the side effect
of allowing you to NFS mount root from a system that doesn't understand
BSD device nodes at all, either because of numbers of bits (like OSF
on an Alpha) or because device nodes simply are not supported on the
host system's NFS server (NetWare, VMS, etc.).  Similar wins can be
achieved in the FS module area using similar techniques (see previous
posting for some "out there" examples).


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.