Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2016 08:57:45 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Peter Holm <peter@holm.cc>
Cc:        Nick Evans <nevans@talkpoint.com>, freebsd-questions@freebsd.org
Subject:   Re: Intel 750 Panic Unmounting During TRIM
Message-ID:  <20160323065745.GV1741@kib.kiev.ua>
In-Reply-To: <20160322202520.GA32179@x2.osted.lan>
References:  <20160322125935.6be25e20@pleiades.nextvenue.com> <20160322202520.GA32179@x2.osted.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 22, 2016 at 09:25:20PM +0100, Peter Holm wrote:
> On Tue, Mar 22, 2016 at 12:59:35PM -0400, Nick Evans wrote:
> > 
> > panic: losing buffer 1
> > cpuid = 2
This one is interesting.

> 
> I see a different panic with this scenario:
> panic: Lock Per-Filesystem Softdep Lock not exclusively locked @ ../../../ufs/ffs/ffs_softdep.c:1950
> 
> https://people.freebsd.org/~pho/stress/log/trim7.txt
This issue should be fixed by the following patch.

diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 04ea39c..bedc8e1 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1937,9 +1937,9 @@ softdep_waitidle(struct mount *mp, int flags __unused)
 		vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
 		error = VOP_FSYNC(devvp, MNT_WAIT, td);
 		VOP_UNLOCK(devvp, 0);
+		ACQUIRE_LOCK(ump);
 		if (error != 0)
 			break;
-		ACQUIRE_LOCK(ump);
 	}
 	ump->softdep_req = 0;
 	if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160323065745.GV1741>