]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r197898:
authorpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 12 Oct 2009 21:08:06 +0000 (21:08 +0000)
committerpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 12 Oct 2009 21:08:06 +0000 (21:08 +0000)
commitc638b62fb3bb1fe87100ac69d75a5ad074ce884e
treea3f801ed5275cb79e2c5898eddb0a7470140258c
parent5c8c2b85d89bd930ea2cf78a08062c9f0a8d7f11
MFC r197898:

If provider is open for writing when we taste it, skip it for classes that
depend on on-disk metadata. This was we won't attach to providers that are used
by other classes. For example we don't want to configure partitions on da0 if
it is part of gmirror, what we really want is partitions on mirror/foo.

During regular work it works like this: if provider is open for writing a class
receives the spoiled event from GEOM and detaches, once provider is closed the
taste event is send again and class can rediscover its metadata if it is still
there.  This doesn't work that way when new class arrives, because GEOM gives
all existing providers for it to taste, also those open for writing. Classes
have to decided on their own if they want to deal with such providers (eg.
geom_dev) or not (classes modified by this commit).

Reported by: des, Oliver Lehmann <lehmann@ans-netz.de>
Tested by: des, Oliver Lehmann <lehmann@ans-netz.de>
Discussed with: phk, marcel
Reviewed by: marcel
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/geom/concat/g_concat.c
sys/geom/label/g_label.c
sys/geom/part/g_part.c
sys/geom/shsec/g_shsec.c
sys/geom/stripe/g_stripe.c
sys/geom/uzip/g_uzip.c