From owner-freebsd-geom@FreeBSD.ORG Fri Mar 26 04:07:54 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 4BC0C16A4CE; Fri, 26 Mar 2004 04:07:54 -0800 (PST) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD42B43D1D; Fri, 26 Mar 2004 04:07:53 -0800 (PST) (envelope-from xride@x12.dk) Received: from x12.dk (xforce.dk [80.164.11.218]) by pasmtp.tele.dk (Postfix) with ESMTP id 873751EC37B; Fri, 26 Mar 2004 13:07:51 +0100 (CET) Received: by x12.dk (Postfix, from userid 666) id 6E8D24D; Fri, 26 Mar 2004 13:07:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by x12.dk (Postfix) with ESMTP id 5C9F126; Fri, 26 Mar 2004 13:07:51 +0100 (CET) Date: Fri, 26 Mar 2004 13:07:51 +0100 (CET) From: Soeren Straarup To: Poul-Henning Kamp In-Reply-To: <2248.1080301717@critter.freebsd.dk> Message-ID: <20040326125709.P7009-100000@x12.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: geom@FreeBSD.org cc: Pawel Jakub Dawidek cc: Lukas Ertl Subject: Re: Problem with g_unload_class() 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: Fri, 26 Mar 2004 12:07:54 -0000 Here is my two cents, seen with a new mind: On Fri, 26 Mar 2004, Poul-Henning Kamp wrote: > In message <20040326114343.GG8930@darkness.comp.waw.pl>, Pawel Jakub Dawidek wr > ites: > >On Fri, Mar 26, 2004 at 12:34:08PM +0100, Poul-Henning Kamp wrote: > >+> >Anyway this will be a big change. > >+>=20 > >+> No it isn't. > > > >Hmm, we can simulate such functionality, by doing only tests > >(can we remove this geom? Yes - block geom, return 0; > >No - unblock all geoms, return an error) in *_destroy_geom() > >function and do real removals in *_fini(). > > No, that is not what _fini is for. > Is there a _test_destroy_geom() ? for test purpose. > The solution would be to give destroy_geom() and argument > which can be one of three values: > TEST > COMMIT > ABANDON One way is to test everything if it is blocked by others, if not block it. When reached the end of the list, check if anything was bloacked by others. If so unblock what we blocked and return an error, else commit > > This is classical CS theory, there is no need to reinvent > the hot water or the deep plate. > I'm trying to get an idea of the geom layer. And just trying to come up with ideas. Soeren Straarup | aka OZ2DAK aka Xride FreeBSD wannabe | FreeBSD since 2.2.6-R My brain is on vacation..