Date: Wed, 17 Aug 2011 11:29:27 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: "Justin T. Gibbs" <gibbs@FreeBSD.org> 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 Message-ID: <20110817092927.GA1660@garage.freebsd.pl> In-Reply-To: <201108162220.p7GMKjke075680@svn.freebsd.org> References: <201108162220.p7GMKjke075680@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110817092927.GA1660>