Module Name: src
Committed By: manu
Date: Fri Oct 5 01:25:38 UTC 2018
Modified Files:
src/sys/kern: vfs_trans.c
Log Message:
Back out sftchg/fstcnt deadlock workaround
The change did prevent some system freeze, but caused spurious
unmount failures reporter by bouyer@.
hannken@ is working on the right fix, see kern/53624
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/vfs_trans.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_trans.c
diff -u src/sys/kern/vfs_trans.c:1.49 src/sys/kern/vfs_trans.c:1.50
--- src/sys/kern/vfs_trans.c:1.49 Thu Sep 27 01:03:40 2018
+++ src/sys/kern/vfs_trans.c Fri Oct 5 01:25:38 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_trans.c,v 1.49 2018/09/27 01:03:40 manu Exp $ */
+/* $NetBSD: vfs_trans.c,v 1.50 2018/10/05 01:25:38 manu Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.49 2018/09/27 01:03:40 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.50 2018/10/05 01:25:38 manu Exp $");
/*
* File system transaction operations.
@@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
#include <sys/atomic.h>
#include <sys/buf.h>
#include <sys/kmem.h>
@@ -533,14 +532,10 @@ fstrans_setstate(struct mount *mp, enum
/*
* All threads see the new state now.
* Wait for transactions invalid at this state to leave.
- * We cannot wait forever because many processes would
- * get stuck waiting for fstcnt in fstrans_start(). This
- * is acute when suspending the root filesystem.
*/
error = 0;
while (! state_change_done(mp)) {
- error = cv_timedwait_sig(&fstrans_count_cv,
- &fstrans_lock, hz / 4);
+ error = cv_wait_sig(&fstrans_count_cv, &fstrans_lock);
if (error) {
new_state = fmi->fmi_state = FSTRANS_NORMAL;
break;