diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-13 12:03:14 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-13 12:03:14 +0000 |
commit | cebf929bc833e9802f4f5142935c8f5355502a26 (patch) | |
tree | 75fa1ba0b33e8f1b9525ba1da134a6b34f2ff4f0 /sys/ufs | |
parent | 69b00d315572c2e82a22b33276ce954746f3f7e7 (diff) | |
download | FreeBSD-src-cebf929bc833e9802f4f5142935c8f5355502a26.zip FreeBSD-src-cebf929bc833e9802f4f5142935c8f5355502a26.tar.gz |
- The VI_DOOMED flag now signals the end of a vnode's relationship with
the filesystem. Check that rather than VI_XLOCK.
- Shorten ffs_reload by one step. The old check for an inactive vnode
was slightly racey, and the code which deals with still active vnodes
is not much more expensive.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 6635e2b..23575e3 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -495,20 +495,13 @@ loop: MNT_ILOCK(mp); MNT_VNODE_FOREACH(vp, mp, nvp) { VI_LOCK(vp); - if (vp->v_iflag & VI_XLOCK) { + if (vp->v_iflag & VI_DOOMED) { VI_UNLOCK(vp); continue; } MNT_IUNLOCK(mp); /* - * Step 4: invalidate all inactive vnodes. - */ - if (vp->v_usecount == 0) { - vgonel(vp, td); - goto loop; - } - /* - * Step 5: invalidate all cached file data. + * Step 4: invalidate all cached file data. */ if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { goto loop; @@ -516,7 +509,7 @@ loop: if (vinvalbuf(vp, 0, td, 0, 0)) panic("ffs_reload: dirty2"); /* - * Step 6: re-read inode data for all active vnodes. + * Step 5: re-read inode data for all active vnodes. */ ip = VTOI(vp); error = @@ -1101,7 +1094,7 @@ loop: * call unless there's a good chance that we have work to do. */ VI_LOCK(vp); - if (vp->v_iflag & VI_XLOCK) { + if (vp->v_iflag & VI_DOOMED) { VI_UNLOCK(vp); continue; } |