Make g_attach() return ENXIO for orphaned providers.
This patch is somewhat incomplete - it doesn't update all the GEOM
classes to properly handle g_attach() errors. I'd like some feedback
before I go and do that.
Differential D26658
Make g_attach() return ENXIO for orphaned providers. trasz on Oct 4 2020, 3:17 PM. Authored by Tags None Referenced Files
Subscribers
Details
Make g_attach() return ENXIO for orphaned providers. This patch is somewhat incomplete - it doesn't update all the GEOM
Diff Detail
Event TimelineComment Actions It worries me that this introduces additional failure point where some classes do not check for it. I would investigate whether the situation of attachment to withered provider is actually possible and/or may be handled otherwise. I agree that there should be a problem with orohan() not being called for consumers attached in that moment, just not sure from what side it should better be addressed without deeper look. Comment Actions Well, the way it came to be is it fixed an actual bug found by NetApp. It's quite hard to reproduce, but given all the places where we happily drop the topology lock, I don't see why it wouldn't happen. Also, note that I'll update this diff to fix all the calls to g_attach() in the tree, if the approach above makes sense. Comment Actions Add missing error checking. One class left to do is graid(4); I'm not sure how to handle |