From owner-freebsd-geom@FreeBSD.ORG Fri Sep 17 08:57:46 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 32D3116A4CF for ; Fri, 17 Sep 2004 08:57:46 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C452A43D49 for ; Fri, 17 Sep 2004 08:57:45 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 38F5AACC5F; Fri, 17 Sep 2004 10:57:44 +0200 (CEST) Date: Fri, 17 Sep 2004 10:57:44 +0200 From: Pawel Jakub Dawidek To: freebsd-geom@FreeBSD.org Message-ID: <20040917085744.GN30151@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nTlbyE9hfvXv7wAq" Content-Disposition: inline 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: Access counts. 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, 17 Sep 2004 08:57:46 -0000 --nTlbyE9hfvXv7wAq Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. George Hartzell reported strange behaviour of gmirror class. On boot one componet suddenly disconnects. After he sent me a full dmesg with debugflags=3D5, I tracked it down, but I'm not sure how to fix it. Gmirror doesn't hold any access count on component providers if device is not open, so everyclass still can open those providers. Ok, we have a good habit to not to open providers when tasting to write, but exclusive bit is used often, but not directly, ie. even if I open da0s1a for reading, da0s1 will be opened r1w0e1. Now, let's go back to George's problem. Gmirror detects da0s1 as a part of the mirror, it creates consumer, etc. Geom gives da0s1a for tasting. Gmirror opens it for reading, but da0s1 is opened r1w0e1. In the same time, gmirror's working thread wants to update metadata, but it cannot do this, because it cannot open da0s1 for writing, because it has exclusive bit already. In such situation gmirror disconnects this component. I'm not really sure how to fix it. Old gmirror was keeping consumer open all the time, even if mirror wasn't open. Poul-Henning convince me to drop this behaviour and don't keep consumer open if mirror isn't open and I strognly agree with this, but I'm not sure how to handle George's problem with our current behaviour. Any ideas? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --nTlbyE9hfvXv7wAq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSqcIForvXbEpPzQRAm2KAKCsA9xv6i3ZjcFXkbSjc1ltnoaxPQCg+E0Q MMCqixfwdpfDj7l4lsOIyHQ= =V0Ce -----END PGP SIGNATURE----- --nTlbyE9hfvXv7wAq--