From owner-svn-src-projects@FreeBSD.ORG Wed Aug 17 09:29:43 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 402E7106566C; Wed, 17 Aug 2011 09:29:43 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id E9B118FC16; Wed, 17 Aug 2011 09:29:42 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 5CB2F885; Wed, 17 Aug 2011 11:29:41 +0200 (CEST) Date: Wed, 17 Aug 2011 11:29:27 +0200 From: Pawel Jakub Dawidek To: "Justin T. Gibbs" Message-ID: <20110817092927.GA1660@garage.freebsd.pl> References: <201108162220.p7GMKjke075680@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <201108162220.p7GMKjke075680@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r224920 - projects/zfsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 09:29:43 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 16, 2011 at 10:20:45PM +0000, Justin T. Gibbs wrote: > Author: gibbs > Date: Tue Aug 16 22:20:45 2011 > New Revision: 224920 > URL: http://svn.freebsd.org/changeset/base/224920 >=20 > Log: > Close several race conditions in the ZFS vdev geom module, most trigger= ed > by concurrent ZFS reprobe and GEOM orphan processing. > =20 > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c: > o Make vdev_geom_close() synchronous instead of deferring > its work to a GEOM event handler. This prevents a future > open call from referencing a consumer that is scheduled for > destruction. [...] > @@ -547,9 +558,9 @@ vdev_geom_close(vdev_t *vd) > cp =3D vd->vdev_tsd; > if (cp =3D=3D NULL) > return; > - vd->vdev_tsd =3D NULL; > - vd->vdev_delayed_close =3D B_FALSE; > - g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL); > + g_topology_lock(); > + vdev_geom_detach(cp); > + g_topology_unlock(); This reverts the @104422 change I made. The reason for deatching vdev =66rom the GEOM event thread was that I was experiencing deadlocks when trying to acquire the topology lock in vdev_geom_close(). It was long time ago, so the deadlock might not be there anymore as there were a lot of changes to the locking in the meantime (it might have been due to LOR between the topology lock and the spa_namespace_lock/spa_config, which is no longer a problem). Just FYI. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk5LifcACgkQForvXbEpPzRYYACgoI6a02GAG4GADJz8y70ooY0u qJEAoK2Kh0BThSRikY34vHvBYsuI0BsN =Xss2 -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--