renaming the current working directory (cwd)
Matthew Dillon
dillon at apollo.backplane.com
Sat Jan 12 13:48:51 PST 2008
What's happening is that DragonFly stores the current, root, and jail
directory for a process as a pointer into the namecache rather then a
pointer to a vnode. The main reason for doing this is to allow mounts,
such as nullfs mounts, to represent the same vnode via different
filesystem paths instead of creating forwarding vnodes. Basically it
allows us to overlay vnodes without having to creating dummy vnodes.
The current cache_rename() code is the culprit. It is not moving the
namecache structure within the namecache topology but is instead copying
the contents of the namecache structure to a new namecache structure,
leaving the process's cwd pointing to the old (now invalid) structure.
I'll see if I can get this fixed today. There are a few issues with
regards to lookup and namespace locking races but they can't be any
worse then the issues already present.
-Matt
More information about the Users
mailing list