Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/ufs/ffs Pull up revision 1.47 (via patch, requested...
details: https://anonhg.NetBSD.org/src/rev/3c35b55c72d6
branches: netbsd-1-5
changeset: 492886:3c35b55c72d6
user: he <he%NetBSD.org@localhost>
date: Tue Feb 26 21:18:05 2002 +0000
description:
Pull up revision 1.47 (via patch, requested by fvdl):
Correct a mistake made in the original merge-in of the softdep
code, and fix a problem which caused ffs_fsync to do unneeded
sync writes.
diffstat:
sys/ufs/ffs/ffs_vnops.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 97a471400b1e -r 3c35b55c72d6 sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Tue Feb 26 21:17:46 2002 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Tue Feb 26 21:18:05 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.31.2.1 2000/12/14 23:36:48 he Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.31.2.2 2002/02/26 21:18:05 he Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -333,13 +333,16 @@
} */ *ap = v;
struct vnode *vp = ap->a_vp;
struct buf *bp, *nbp;
- int s, error, passes, skipmeta;
+ int s, error, passes, skipmeta, inodedeps_only, waitfor;;
if (vp->v_type == VBLK &&
vp->v_specmountpoint != NULL &&
(vp->v_specmountpoint->mnt_flag & MNT_SOFTDEP))
softdep_fsync_mountdev(vp);
+ inodedeps_only = DOINGSOFTDEP(vp) && (ap->a_flags & FSYNC_RECLAIM)
+ && LIST_EMPTY(&vp->v_dirtyblkhd);
+
/*
* Flush all dirty buffers associated with a vnode
*/
@@ -421,8 +424,12 @@
}
}
splx(s);
- return (VOP_UPDATE(vp, NULL, NULL,
- (ap->a_flags & FSYNC_WAIT) ? UPDATE_WAIT : 0));
+
+ if (inodedeps_only)
+ waitfor = 0;
+ else
+ waitfor = (ap->a_flags & FSYNC_WAIT) ? UPDATE_WAIT : 0;
+ return (VOP_UPDATE(vp, NULL, NULL, waitfor));
}
/*
Home |
Main Index |
Thread Index |
Old Index