diff options
author | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
commit | 287836faea1ff2f002f4c9ea357e87cb7f2b4cd6 (patch) | |
tree | 9524fb381c1cbe8aed4ee0af7b1a693057985617 /sys/fs/unionfs | |
parent | ff090abf5121f6bf2199248b70a4896d25f49550 (diff) | |
download | FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.zip FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.tar.gz |
Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
return value: LK_EXCLOTHER, when the lock is held exclusively by another
process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
locked/unlocked.
This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.
Discussed with: grog, mch, peter, phk
Reviewed by: peter
Diffstat (limited to 'sys/fs/unionfs')
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 9 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 1a53f88..ccd9a13 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -148,7 +148,8 @@ union_mount(mp, path, data, ndp, p) vrele(ndp->ni_dvp); ndp->ni_dvp = NULL; - UDEBUG(("mount_root UPPERVP %p locked = %d\n", upperrootvp, VOP_ISLOCKED(upperrootvp))); + UDEBUG(("mount_root UPPERVP %p locked = %d\n", upperrootvp, + VOP_ISLOCKED(upperrootvp, NULL))); /* * Check multi union mount to avoid `lock myself again' panic. @@ -396,7 +397,8 @@ union_root(mp, vpp) * root union_node being locked. We let union_allocvp() deal with * it. */ - UDEBUG(("union_root UPPERVP %p locked = %d\n", um->um_uppervp, VOP_ISLOCKED(um->um_uppervp))); + UDEBUG(("union_root UPPERVP %p locked = %d\n", um->um_uppervp, + VOP_ISLOCKED(um->um_uppervp, NULL))); VREF(um->um_uppervp); if (um->um_lowervp) @@ -405,7 +407,8 @@ union_root(mp, vpp) error = union_allocvp(vpp, mp, NULLVP, NULLVP, NULL, um->um_uppervp, um->um_lowervp, 1); UDEBUG(("error %d\n", error)); - UDEBUG(("union_root2 UPPERVP %p locked = %d\n", um->um_uppervp, VOP_ISLOCKED(um->um_uppervp))); + UDEBUG(("union_root2 UPPERVP %p locked = %d\n", um->um_uppervp, + VOP_ISLOCKED(um->um_uppervp, NULL))); return (error); } diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 08763ce..5ab1036 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -363,10 +363,10 @@ union_lookup(ap) uerror, upperdvp, upperdvp->v_usecount, - VOP_ISLOCKED(upperdvp), + VOP_ISLOCKED(upperdvp, NULL), uppervp, (uppervp ? uppervp->v_usecount : -99), - (uppervp ? VOP_ISLOCKED(uppervp) : -99) + (uppervp ? VOP_ISLOCKED(uppervp, NULL) : -99) )); /* @@ -1698,7 +1698,7 @@ union_abortop(ap) struct componentname *cnp = ap->a_cnp; struct proc *p = cnp->cn_proc; struct union_node *un = VTOUNION(ap->a_dvp); - int islocked = VOP_ISLOCKED(ap->a_dvp); + int islocked = VOP_ISLOCKED(ap->a_dvp, NULL); struct vnode *vp; int error; @@ -1850,7 +1850,7 @@ union_unlock(ap) */ if ((un->un_flags & UN_ULOCK) && - lockstatus(&un->un_lock) != LK_EXCLUSIVE) { + lockstatus(&un->un_lock, NULL) != LK_EXCLUSIVE) { un->un_flags &= ~UN_ULOCK; VOP_UNLOCK(un->un_uppervp, LK_EXCLUSIVE, p); } |