]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
Synchronize nullfs with HEAD, mostly merge all locking changes.
authorkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Mar 2012 18:33:11 +0000 (18:33 +0000)
committerkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Mar 2012 18:33:11 +0000 (18:33 +0000)
commitcadca1af310ab2b973fff19bb46ed5d951ea952c
treee2dcd7fdd452c7386c9ccd7c6c125b14e9ae2c82
parent826e6f8d64e5dcea658ec35abcd8cd13b8c7db3f
Synchronize nullfs with HEAD, mostly merge all locking changes.

Tested by: pho

MFC r229428:
Document the state of the lowervp vnode for null_nodeget().

MFC r229431:
Do the vput() for the lowervp in the null_nodeget() for error case too.
Several callers of null_nodeget() did the cleanup itself, but several
missed it, most prominent being null_bypass(). Remove the cleanup from
the callers, now null_nodeget() handles lowervp free itself.

MFC r229600 (by dim):
In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode
pointer 'lowervp' instead of 'vp', which is uninitialized at that point.

MFC r230304 (by rea):
Use hashdestroy() instead of naive free().

MFC r232299:
Move the code to destroy half-contructed nullfs vnode into helper
function null_destroy_proto() from null_insmntque_dtr(). Also
apply null_destroy_proto() in null_nodeget() when we raced and a vnode
is found in the hash, so the currently allocated protonode shall be
destroyed.

Lock the vnode interlock around reassigning the v_vnlock.

MFC r232301:
Always request exclusive lock for the lower vnode in nullfs_vget().
The null_nodeget() requires exclusive lock on lowervp to be able to
insmntque() new vnode.

MFC r232303:
In null_reclaim(), assert that reclaimed vnode is fully constructed,
instead of accepting half-constructed vnode. Previous code cannot decide
what to do with such vnode anyway, and although processing it for hash
removal, paniced later when getting rid of nullfs reference on lowervp.

While there, remove initializations from the declaration block.

MFC r232304:
Document that null_nodeget() cannot take shared-locked lowervp due to
insmntque() requirements.

MFC r232305:
Allow shared locks for reads when lower filesystem accept shared locking.

MFC r232383:
Do not expose unlocked unconstructed nullfs vnode on mount list.
Lock the native nullfs vnode lock before switching the locks.

git-svn-id: svn://svn.freebsd.org/base/stable/8@232665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nullfs/null_subr.c
sys/fs/nullfs/null_vfsops.c
sys/fs/nullfs/null_vnops.c