Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2004 10:57:44 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        freebsd-geom@FreeBSD.org
Subject:   Access counts.
Message-ID:  <20040917085744.GN30151@darkness.comp.waw.pl>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040917085744.GN30151>