From owner-freebsd-geom@FreeBSD.ORG Wed May 19 07:57:46 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEB2D16A4CE for ; Wed, 19 May 2004 07:57:46 -0700 (PDT) Received: from mailbox.univie.ac.at (mailbox-lmtp.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BB3943D1F for ; Wed, 19 May 2004 07:57:46 -0700 (PDT) (envelope-from le@FreeBSD.org) Received: from pcle2.cc.univie.ac.at (pcle2.cc.univie.ac.at [131.130.2.177]) i4JEvAmj1273798 for ; Wed, 19 May 2004 16:57:12 +0200 Date: Wed, 19 May 2004 16:57:10 +0200 (CEST) From: Lukas Ertl To: geom@FreeBSD.org Message-ID: <20040519165626.W4275@pcle2.cc.univie.ac.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mailbox 4249; Body=1 Fuz1=1 Fuz2=1 Subject: Unloading GEOM classes X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 14:57:47 -0000 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/