spoiled but acr = 1.

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Jun 4 10:34:51 GMT 2004


On Fri, Jun 04, 2004 at 10:26:59AM +0200, Pawel Jakub Dawidek wrote:
+> Hi.
+> 
+> While working on geom_mirror and using geom_nop I've found that this
+> is possible to panic geom in this way:
+> 
+> We have providers: md0 and md0.nop (attached to md0, but not opened).
+> 
+> We load new class (geom_mirror).
+> 
+> GEOM gives provider md0 for taste.
+> 
+> Class is tasting md0 and opening it with r1w1e1.
+> 
+> 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.
+> 
+> Before g_spoil_event can be proceeded we're still in g_new_provider
+> event and the next provider to taste is md0.nop.
+> 
+> Class is trying to open md0.nop for reading.
+> 
+> Provider md0.nop is trying to open through its consumer (which was
+> marked as beeing spoiled) provider md0 and... panic.
+> 
+> 
+> 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?
+> 
+> Hmm, or maybe something like this:
+> 
+> 	http://people.freebsd.org/~pjd/patches/geom_subr.c.14.patch
+> 
+> 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.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd at FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20040604/c4faa719/attachment.bin


More information about the freebsd-geom mailing list