diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-07-11 15:32:23 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-07-11 15:32:23 +0000 |
commit | cac0e705f4953514a55b807f91deab667c430d78 (patch) | |
tree | 0a60d5a6c21dc46e19f70b006cbbadd0b0e52ca6 /sys/ufs/ffs/ffs_softdep.c | |
parent | 4b04e60c842c4155e256bc62000c2546a4405d38 (diff) |
Bring back the change in rev 1.70, it is safe now:
Propagate the wait flag from fsync down to softdep_fsync_mountdev()
and do not perform synchronous sync there is no wait requested by
skipping the drain_output() call. This fixes a problem where
update kthread would sleep forever on some vnode since work is created
faster than it can be flushed.
OK deraadt@
Diffstat (limited to 'sys/ufs/ffs/ffs_softdep.c')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index fa7678027f6..ec2960a9acc 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.91 2007/06/01 20:23:26 pedro Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.92 2007/07/11 15:32:22 millert Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -4718,7 +4718,8 @@ softdep_fsync_mountdev(vp, waitfor) */ nbp = LIST_FIRST(&vp->v_dirtyblkhd); } - drain_output(vp, 1); + if (waitfor == MNT_WAIT) + drain_output(vp, 1); FREE_LOCK(&lk); } |