*BSD News Article 65537


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.telstra.net!act.news.telstra.net!vic.news.telstra.net!news.mira.net.au!news.vbc.net!samba.rahul.net!rahul.net!a2i!bug.rahul.net!rahul.net!a2i!in-news.erinet.com!imci5!imci4!newsfeed.internetmci.com!in1.uu.net!news.artisoft.com!usenet
From: Terry Lambert <terry@lambert.org>
Newsgroups: comp.os.linux.development.system,comp.unix.bsd.freebsd.misc
Subject: Re: Ideal filesystem
Date: 10 Apr 1996 07:02:14 GMT
Organization: Artisoft, Inc.
Lines: 68
Message-ID: <4kfmdm$dgs@coyote.Artisoft.COM>
References: <4hptj4$cf4@cville-srv.wam.umd.edu> <3140C968.20699696@netcom.com> <rjlok5zje0.fsf@babbage.dina.kvl.dk>
NNTP-Posting-Host: hecate.artisoft.com
Xref: euryale.cc.adfa.oz.au comp.os.linux.development.system:21043 comp.unix.bsd.freebsd.misc:17033

Per Abrahamsen <abraham@dina.kvl.dk> wrote:
] TL> If you have to search each potential executable as a directory
] TL> to see if it has an "a.out" (executable file) "fork", then
] TL> you have increased the search time one order of magnitude on
] TL> an expotential curve (directories rarely contain one file).
] 
] I'm unable to comprehend the problem.  
] 
] Now: The shell puts everything in the path with executable permission
] in the hash.  If it is not really an executable, we get an error.
] This is rare, as you usually don't put non-executables in the path.

Here is the problem.  You are changing this assumption, OR you
are requiring the user to make the association each time they
create an executable file, using a utility.

This is much more of a pain than the alternative, which is
"it just works".

The fix is IOTTMCO -- search out the a.outs.  This is nearly
a NOP if the FS uses a btree to store naming information,
but this whole "file-as-directory" argument is predicated
on the assumption that we can never, ever, in the future,
at any time, change the file system because we love our current
file system and we can't bear to see it die so *much* that
we are willing to kludge files-as-directories to avoid even a
modest change to the FS.

Oh darn.


By harping on *one* example, which *could* be implemented
as file-as-directory, though it would be a kludge and require
changing the shells and the exec loaders, etc., you aren't
really contributing anything to the idea of an "ideal filesystem".


] Then: The shell puts everything in the path with executable permission
] in the hash.  If it is not really an executable, we get an error.
] This is rare, as you usually don't put non-executables in the path.

That's because it is rare for an a.out to become disassociated
from its name, but with file-as-directory, you open a huge
window allowing this to happen, and greatly complicate life in
general.

It *POSSIBLE* for this one application, but it is far from
*DESIRABLE*.

] Here is an example with tcsh:
] 
] 	kleene% mkdir ~/bin/kurt
] 	kleene% rehash
] 	kleene% kurt
] 	/home/user_22/abraham/bin/kurt: Permission denied.
] 
] What would be so much worse worse with directory attributes?

tcsh is obviously broken.  See my previous posting.  I did the
same thing for "ls" in csh, and it functioned as expected (no
error).  Clearly tcsh ignores the directory attribute.


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