Rename bug?

Guy Harris guy at gorodish.Sun.COM
Fri Jun 17 03:59:56 AEST 1988


> And thus, fails.  The discussion is about a manner in which those
> different file systems do NOT provide the same system call interface. 
> Some of them give an error for rename("foo","foo"), some delete "foo",
> some do nothing.

Geez, talk about "people unclear on the concept...."  The discussion is about a
bug in some UFS implementations!  This does NOT mean that there is some
inherent flaw in the VFS mechanism.  This means that there is a flaw in some
UFS implementations; that particular flaw is fixed in SunOS 4.0.

> NFS and VFS do not guarantee the same semantics for different file
> systems.  

No shit, Sherlock!  VFS was *NEVER INTENDED* to support the exact same
semantics on all file systems; in some sense, that's the *point* of it!  If,
as, and when "/proc" is implemented under VFS, for example, try doing a
"rename" on it; you're likely to be rudely surprised if you expect it to work -
UNIX generally considers it impolite to change process IDs of processes on the
fly.  It might be amusing to consider having "unlink" do a "kill(pid,
SIGKILL)", but that wouldn't conform to UNIX semantics either, unless you made
the "/proc" directory sticky.

Making a particular file system fully or partially support the same semantics
as a UNIX on-disk file system is the responsibility of the author of the file
system code; it is NOT the responsibility of the VFS mechanism.  NFS was not
designed to fully support UNIX file system semantics; some design compromises
were made in order to achieve goals other than full UNIX file system semantics.
You can debate whether these design compromises were correct or not (I don't
plan to do so; it's not germane to this discussion), but that's a different
matter.



More information about the Comp.unix.questions mailing list