cvs commit: src/sys/kern vfs_syscalls.c

Matthew Dillon dillon at apollo.backplane.com
Wed Aug 17 10:31:17 PDT 2005


:...
:the standard differenciates between files (UFS: inode) and directory
:entries.
:
:>     It's simple and straightfoward, not ultra complex.  It is not
:>     rename's responsibility to validate or resolve symlinks, or to
:>     treat hardlinks as a special case.  rename is entirely a namespace
:>     operation.  The only requirements are that it disallow impossible
:>     combinations, such as trying to rename a file over a directory,
:>     or rename a directory into a sub-directory of itself.
:
:As soon as the "new" operand already exists it is not a pure namespace
:operation anymore. What happens if two NFS clients have the directory
:cached, the first issues "mv a b", the second "mv b a"? Are both clients
:issuing remove operations with the new code?
:
:Joerg

    No, they aren't.  Don't forget that all VFS operations have some sort
    of locking.  In the case of DragonFly, the namespace itself is locked
    so a simultanious back-and-forth rename can't happen.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list