From cac0e705f4953514a55b807f91deab667c430d78 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 11 Jul 2007 15:32:23 +0000 Subject: 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@ --- sys/ufs/ffs/ffs_softdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/ufs/ffs/ffs_softdep.c') 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); } -- cgit v1.2.3