diff options
author | phk <phk@FreeBSD.org> | 1997-08-31 07:32:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-08-31 07:32:39 +0000 |
commit | 0b3a12b83eb2feac881bc220304736c7fc61556a (patch) | |
tree | cdd844c554de3bb51aaf1b188cf99f92ac8467ee /sys/ufs | |
parent | 2fd4aa4ddff6800e1a692d84c9a3fbf1ef3df97a (diff) | |
download | FreeBSD-src-0b3a12b83eb2feac881bc220304736c7fc61556a.zip FreeBSD-src-0b3a12b83eb2feac881bc220304736c7fc61556a.tar.gz |
Change the 0xdeadb hack to a flag called VDOOMED.
Introduce VFREE which indicates that vnode is on freelist.
Rename vholdrele() to vdrop().
Create vfree() and vbusy() to add/delete vnode from freelist.
Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0)
vnodes off the freelist.
Generalize vhold()/v_holdcnt to mean "do not recycle".
Fix reassignbuf()s lack of use of vhold().
Use vhold() instead of checking v_cache_src list.
Remove vtouch(), the vnodes are always vget'ed soon enough
after for it to have any measuable effect.
Add sysctl debug.freevnodes to keep track of things.
Move cache_purge() up in getnewvnodes to avoid race.
Decrement v_usecount after VOP_INACTIVE(), put a vhold() on
it during VOP_INACTIVE()
Unmacroize vhold()/vdrop()
Print out VDOOMED and VFREE flags (XXX: should use %b)
Reviewed by: dyson
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/lfs/lfs_segment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/lfs/lfs_segment.c b/sys/ufs/lfs/lfs_segment.c index d09a185..59206c4 100644 --- a/sys/ufs/lfs/lfs_segment.c +++ b/sys/ufs/lfs/lfs_segment.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_segment.c 8.10 (Berkeley) 6/10/95 - * $Id: lfs_segment.c,v 1.22 1997/06/15 17:56:46 dyson Exp $ + * $Id: lfs_segment.c,v 1.23 1997/08/02 14:33:20 bde Exp $ */ #include <sys/param.h> @@ -1222,7 +1222,7 @@ lfs_vref(vp) if ((vp->v_flag & VXLOCK) || /* XXX */ (vp->v_usecount == 0 && - vp->v_freelist.tqe_prev == (struct vnode **)0xdeadb)) + vp->v_flag & VDOOMED)) return(1); return (vget(vp, 0, p)); } |