VFS messaging/interfacing work stage 7a/99: Firm up stage 7 a bit by
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 1 Oct 2004 07:08:23 +0000 (07:08 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 1 Oct 2004 07:08:23 +0000 (07:08 +0000)
commit5536114711bfe79df90c5716faa6316eafef5adf
tree36539029387db7458ccd2d71ef08682d6a1cb792
parent217396181c21908d5ec1a8581504dda822dbe7f1
VFS messaging/interfacing work stage 7a/99:  Firm up stage 7 a bit by
automatically vhold()ing any vnodes associated with a locked namecache
record.  This will prevent the vnode from being recycled (which would
unexpectedly cause the namecache entry to revert to an unresolved state
even while it is locked).

Previously only vnodes associated with namecache records with children
were being held (in order to guarentee that the vnode associated with the
parent directory of a locked leaf namecache record would stick around without
having to lock the parent directory's namecache record).

The point here being that we want to have to only lock and pass a single
namecache record to definitively identify an object in the namespace,
rather then the combination of directory and leaf nodes (and other junk)
that the old API required.  For example, the old RENAME API required 6
arguments (fdvp, fvp, fcnp, tdvp, tvp, tcnp) while the new one will only
require two arguments (fncp, tncp).
sys/kern/vfs_cache.c