Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2010 12:54:56 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Stefan Bethke <stb@lassitu.de>
Cc:        stable@freebsd.org
Subject:   Re: Label question...why does ufs label vanish on mount?
Message-ID:  <4CB573E0.1030104@yandex.ru>
In-Reply-To: <B6AAC89E-5651-4B4B-B770-11443A7BCC22@lassitu.de>
References:  <20101012185100.5AA661CC3E@ptavv.es.net>	<4CB53BF7.1020408@yandex.ru> <B6AAC89E-5651-4B4B-B770-11443A7BCC22@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig0F0E3C2540D8068FEB5F1F7D
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

On 13.10.2010 10:29, Stefan Bethke wrote:
>> When you are opening provider for writing (i.e. mount FS) GEOM(4)
>> initiates SPOILING and all consumers that are attached to this provide=
r
>> except one will self-destroyed. When you are closing provider GEOM(4)
>> initiates TASTING and consumers can return back. Look at man 4 geom
>> for details.
>=20
> That explains the mechanism, but not the rationale.  Or is it just an=20
> unintended consequence?  And how is da2p1 different from ufs/mylabel?
> (Mount da2p1 and ufs/mylabel is removed, but not the other way around.)=


This is by design. Any provider's entries in /dev are created by GEOM_DEV=

class. GEOM_PART serves partition tables. GEOM_PART_GPT as part of GEOM_P=
ART
serves GPT. GEOM_PART creates new provider for each entry in GPT.

For example:
da2 has GPT. da2p1 - first entry in GPT. GEOM_PART creates da2p1 provider=

and GEOM initiate tasting. GEOM_DEV creates new consumer for da2p1 and
/dev/da2p1 entry in devfs. At the same time GEOM_LABEL checks this provid=
er
and if it found "labels" it creates new consumer and new provider with na=
me
ufs/mylabel via slicer interface. After creating new provider GEOM initia=
te
tasting again. And GEOM_DEV creates new consumer and /dev/ufs/mylabel ent=
ry.

So, now we have two providers through we can get access to one device.
But ufs/mylabel's is on top of da2p1. When we do first open one of them f=
or
writing GEOM initiate spoiling for protecting from stale metadata. When w=
e
do open da2p1 then GEOM_LABEL receives spoil event and destroys own provi=
der.

If I'm wrong Pawel can correct me.

--=20
WBR, Andrey V. Elsukov


--------------enig0F0E3C2540D8068FEB5F1F7D
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJMtXPjAAoJEAHF6gQQyKF6CY0H/0N2S7hsxzIdyg8uSKDrWpQ+
laAFM8AOhVArtNv0/KfPQnNm670rEeNZYfZhwNnutblhvBnNR3J/ZctgwE5mrmx6
6xXwKKz5Md/FCeZolgFAy74LL+9CFiqws6tfTffUqXpuEY5o0OZb0cnxeaN1xLQS
G/cLQ1V2oHufOm1Fd1dIQVzJ0iHkNbLXT1TgiWzPHTrkWj1w3Ke2azRhQFxxLb/9
6FUUtIbkRcJH/4Elk/TJ3aMUfQ1hmPIx6Ih0+Gfhs9gThK860f4nSneZxD4V9Whr
6l/0Q0ZBljru0MJ+/eSmPbATkeB6YLmBiDuDV79icUiNF8RXLb0XTaRcCypXzO4=
=j7M0
-----END PGP SIGNATURE-----

--------------enig0F0E3C2540D8068FEB5F1F7D--



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