From owner-freebsd-fs@FreeBSD.ORG Mon Oct 8 13:11:50 2012 Return-Path: Delivered-To: fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AB6610656D1; Mon, 8 Oct 2012 13:11:50 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.27]) by mx1.freebsd.org (Postfix) with ESMTP id 14F908FC16; Mon, 8 Oct 2012 13:11:49 +0000 (UTC) Received: from [84.44.210.110] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1TLCym-0006VS-F3; Mon, 08 Oct 2012 15:02:40 +0200 Date: Mon, 8 Oct 2012 14:35:41 +0200 From: Fabian Keil To: Andriy Gapon Message-ID: <20121008143541.537d8490@fabiankeil.de> In-Reply-To: <5071A071.1020800@FreeBSD.org> References: <76CBA055-021F-458D-8978-E9A973D9B783@scsiguy.com> <506EB43B.8050204@FreeBSD.org> <5071A071.1020800@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/T+pdA.9Hn4G.E1AymhzME8V"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: fs@FreeBSD.org Subject: Re: ZFS: Deadlock during vnode recycling X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 13:11:50 -0000 --Sig_/T+pdA.9Hn4G.E1AymhzME8V Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andriy Gapon wrote: > In fact here is a real patch that I would like to propose: > http://people.freebsd.org/~avg/zfs-getnewvnode_reserve.diff >=20 > The patch incorporates the kib's patch for extending VFS API that helps t= o avoid > entering the vnode inactive/reclaim path from getnewvnode. >=20 > The patch should fix the problem reported in this thread and the problem = from > "panic: _sx_xlock_hard: recursed on non-recursive sx zfsvfs->z_hold_mtx .= .." > thread that runs in parallel. >=20 > Reviews and testing are welcome. I'd probably replace the intentionally empty "else if (zp->z_unlinked)" block in zfs_freebsd_reclaim() with a comment, but other than that the patch looks good to me. While I'm using nullfs on a couple of jails, I never experienced the panic above and can thus only report that I didn't notice any regressions so far since applying the patch yesterday. Fabian --Sig_/T+pdA.9Hn4G.E1AymhzME8V Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlByyKAACgkQBYqIVf93VJ01ZQCgtVvK7AyF2rgoEvAk0+wpALS/ f/8An1RtXtLDyv83IFRZZ0YX8pCcTq0k =7PFl -----END PGP SIGNATURE----- --Sig_/T+pdA.9Hn4G.E1AymhzME8V--