From owner-freebsd-geom@FreeBSD.ORG Fri Jun 4 03:34:51 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6127B16A4CE for ; Fri, 4 Jun 2004 03:34:51 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10E7343D45 for ; Fri, 4 Jun 2004 03:34:51 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id B6FC1AC96A; Fri, 4 Jun 2004 12:34:47 +0200 (CEST) Date: Fri, 4 Jun 2004 12:34:47 +0200 From: Pawel Jakub Dawidek To: geom@freebsd.org Message-ID: <20040604103447.GJ12007@darkness.comp.waw.pl> References: <20040604082659.GI12007@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DfnuYBTqzt7sVGu3" Content-Disposition: inline In-Reply-To: <20040604082659.GI12007@darkness.comp.waw.pl> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: Re: spoiled but acr = 1. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2004 10:34:51 -0000 --DfnuYBTqzt7sVGu3 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 04, 2004 at 10:26:59AM +0200, Pawel Jakub Dawidek wrote: +> Hi. +>=20 +> While working on geom_mirror and using geom_nop I've found that this +> is possible to panic geom in this way: +>=20 +> We have providers: md0 and md0.nop (attached to md0, but not opened). +>=20 +> We load new class (geom_mirror). +>=20 +> GEOM gives provider md0 for taste. +>=20 +> Class is tasting md0 and opening it with r1w1e1. +>=20 +> Provider was opened for writing so all md0's consumers are marked as +> beeing spoiled (md0.nop -> md0 consumer too) and g_spoil_event is send. +>=20 +> Before g_spoil_event can be proceeded we're still in g_new_provider +> event and the next provider to taste is md0.nop. +>=20 +> Class is trying to open md0.nop for reading. +>=20 +> Provider md0.nop is trying to open through its consumer (which was +> marked as beeing spoiled) provider md0 and... panic. +>=20 +>=20 +> I'm not sure how to solve this yet. Maybe before we give provider +> for taste we should check if any of its consumer is marked as beeing +> spoiled. But when we should return with taste of this provider? +>=20 +> Hmm, or maybe something like this: +>=20 +> http://people.freebsd.org/~pjd/patches/geom_subr.c.14.patch +>=20 +> but I'm afraid we can cancel too much. I updated the patch. In my situation it was caused by taste method call, but from g_new_provider_event() and I was checking wrong consumers. This patch works for me, but I'm not still sure if I'm not canceling too much. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --DfnuYBTqzt7sVGu3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAwFBHForvXbEpPzQRAi4TAJ4po7r33vHR0tWwn0/1QXOt1A1pHgCgzba/ 2jz47qLdQU6GrtzKUtvn2Iw= =9nhI -----END PGP SIGNATURE----- --DfnuYBTqzt7sVGu3--