From owner-freebsd-fs@FreeBSD.ORG Mon Jun 13 20:20:40 2011 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D891065673; Mon, 13 Jun 2011 20:20:40 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id C73ED8FC16; Mon, 13 Jun 2011 20:20:39 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 9267E45C8C; Mon, 13 Jun 2011 22:20:38 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 87A4E45685; Mon, 13 Jun 2011 22:20:33 +0200 (CEST) Date: Mon, 13 Jun 2011 22:20:31 +0200 From: Pawel Jakub Dawidek To: "K. Macy" Message-ID: <20110613202031.GB1733@garage.freebsd.pl> References: <4DF25544.3020301@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: fs@freebsd.org Subject: Re: Drop of spa_namespace lock in vdev_geom.c 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, 13 Jun 2011 20:20:40 -0000 --ftEhullJWpWg/VHq Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 10, 2011 at 09:35:08PM +0200, K. Macy wrote: > On Fri, Jun 10, 2011 at 7:32 PM, Justin T. Gibbs wrot= e: > > Dropping and reacquiring the spa_namespace lock in vdev_geom_open() > > creates a lock order reversal with the spa_config locks. =A0As the > > spa_config locks are not standard mutexes, witness will not warn > > about this issue. >=20 > The real problem is that WITNESS is disabled on the sx locks used for > mutex compatibility in ZFS. This questionable decision has made > debugging deadlocks quite painful on a number of occasions. I think > this choice should be revisited and perhaps special workaround shims > added for cases where cv_wait is called. WITNESS is disabled only if you are compiling ZFS without debug. This was done because of huge number of false-positive LOR reports from users. If you are developing ZFS you should have debug turned on anyway. I had a patch for additional sx-creation flag to tell witness that we don't want LOR reports, but we still want to track the lock itself, but there were no agreement among people I talked to about that, so it never went in. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --ftEhullJWpWg/VHq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk32cQ4ACgkQForvXbEpPzSgMgCfYTiI2LqbDzOBfnBeItLGY7NH BRYAoNZ3G4LcZugdHtnjJZ1vK2SBhMWu =JE2c -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq--