Date: Wed, 19 May 2004 16:57:10 +0200 (CEST) From: Lukas Ertl <le@FreeBSD.org> To: geom@FreeBSD.org Subject: Unloading GEOM classes Message-ID: <20040519165626.W4275@pcle2.cc.univie.ac.at>
next in thread | raw e-mail | index | archive | help
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@FreeBSD.org http://people.freebsd.org/~le/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040519165626.W4275>