Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Back out sftchg/fstcnt deadlock workaround
details: https://anonhg.NetBSD.org/src/rev/3942017c66cd
branches: trunk
changeset: 433792:3942017c66cd
user: manu <manu%NetBSD.org@localhost>
date: Fri Oct 05 01:25:38 2018 +0000
description:
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
diffstat:
sys/kern/vfs_trans.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r ed38336a3ef9 -r 3942017c66cd sys/kern/vfs_trans.c
--- a/sys/kern/vfs_trans.c Thu Oct 04 23:53:13 2018 +0000
+++ b/sys/kern/vfs_trans.c Fri Oct 05 01:25:38 2018 +0000
@@ -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 @@
#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 @@
/*
* 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;
Home |
Main Index |
Thread Index |
Old Index