Unloading GEOM classes
Lukas Ertl
le at FreeBSD.org
Wed May 19 07:57:47 PDT 2004
Hello fellow GEOM hackers,
I'd like to get the discussion about unloading GEOM classes rolling again,
and I'm really pleading for a change of the current code in geom_subr.c.
While the old way has the problem of not making sure that a class is
really completely destroyed before being removed from the list, the new
way makes it impossible to unload a class that has geoms with active
providers and consumers, since the unloading happens on the event thread,
and the geom "withering" also happens on the event thread, which is
blocked by the unloading operation. So you end up either in an infinite
loop or in a panic, depending on class destruction code.
Of course, as we have already discussed, the Right Way(TM) is to first
test if the class destruction is completely possible and only then commit
to the destruction. But as we aren't there yet, I'll strongly vote for
reverting the change, maybe putting a LIST_FOREACH_SAFE instead of the
LIST_FOREACH to not run blindly into already deleted geoms.
Comments?
cheers,
le
--
Lukas Ertl http://mailbox.univie.ac.at/~le/
le at FreeBSD.org http://people.freebsd.org/~le/
More information about the freebsd-geom
mailing list