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/ From owner-freebsd-geom@FreeBSD.ORG Wed May 19 08:14:25 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 C120316A4CE; Wed, 19 May 2004 08:14:25 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id A16C643D1F; Wed, 19 May 2004 08:14:24 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4JFEK9Q019868; Wed, 19 May 2004 17:14:20 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Lukas Ertl From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 19 May 2004 16:57:10 +0200." <20040519165626.W4275@pcle2.cc.univie.ac.at> Date: Wed, 19 May 2004 17:14:20 +0200 Message-ID: <19867.1084979660@critter.freebsd.dk> cc: geom@freebsd.org Subject: Re: 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 15:14:25 -0000 In message <20040519165626.W4275@pcle2.cc.univie.ac.at>, Lukas Ertl writes: >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. We need to get this done right and stop hacking it. A major part of the problem is that come into the unloading with Giant held so we are forced to use the event-queue to do Giant isolation for us. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Wed May 19 08:43:30 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 5D59516A4CE; Wed, 19 May 2004 08:43:30 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7C6F43D54; Wed, 19 May 2004 08:43:29 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4JFhSFi020078; Wed, 19 May 2004 17:43:28 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Lukas Ertl From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 19 May 2004 16:57:10 +0200." <20040519165626.W4275@pcle2.cc.univie.ac.at> Date: Wed, 19 May 2004 17:43:28 +0200 Message-ID: <20077.1084981408@critter.freebsd.dk> cc: geom@freebsd.org Subject: Re: 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 15:43:30 -0000 In message <20040519165626.W4275@pcle2.cc.univie.ac.at>, Lukas Ertl writes: >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. OK, I just checked with peter@ and he belives that we can simply do a DROP_GIANT() ... PICKUP_GIANT() in the g_modevent() and avoid the need for the eventqueue there. Can somebody try that ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Wed May 19 09:20:16 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 2548316A4CE; Wed, 19 May 2004 09:20:15 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D7E243D2F; Wed, 19 May 2004 09:20:15 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 4FD33ACBCB; Wed, 19 May 2004 18:19:57 +0200 (CEST) Date: Wed, 19 May 2004 18:19:57 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040519161957.GA845@darkness.comp.waw.pl> References: <20040519165626.W4275@pcle2.cc.univie.ac.at> <20077.1084981408@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p+u7T7tYDgrfw07S" Content-Disposition: inline In-Reply-To: <20077.1084981408@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org cc: Lukas Ertl Subject: Re: 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 16:20:16 -0000 --p+u7T7tYDgrfw07S Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 19, 2004 at 05:43:28PM +0200, Poul-Henning Kamp wrote: +> In message <20040519165626.W4275@pcle2.cc.univie.ac.at>, Lukas Ertl writ= es: +> >Hello fellow GEOM hackers, +> > +> >I'd like to get the discussion about unloading GEOM classes rolling aga= in, +> >and I'm really pleading for a change of the current code in geom_subr.c. +>=20 +> OK, I just checked with peter@ and he belives that we can simply do +> a DROP_GIANT() ... PICKUP_GIANT() in the g_modevent() and avoid the +> need for the eventqueue there. +>=20 +> Can somebody try that ? Here is the patch: http://people.freebsd.org/~pjd/patches/g_unload_class.patch UNTESTED. Lukas, could you try it and see if it fix your problem. The whole trick could a g_waitidle() after calling destroy_geom method. BTW. We should really commit g_waitidle_lock() version, it will be useful here too: http://people.freebsd.org/~pjd/patches/g_waitidle_lock.patch --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --p+u7T7tYDgrfw07S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAq4ktForvXbEpPzQRAtOEAJ9p2b/BhzLSkVVCfuHhB/u//t7R3gCePsna kANDWhstw1OduLZ5LOhTmfI= =R2rX -----END PGP SIGNATURE----- --p+u7T7tYDgrfw07S-- From owner-freebsd-geom@FreeBSD.ORG Thu May 20 03:42:40 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 E1C3316A4CE for ; Thu, 20 May 2004 03:42:40 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F8A643D45 for ; Thu, 20 May 2004 03:42:40 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4KAgGlb025149 for ; Thu, 20 May 2004 12:42:16 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: geom@freebsd.org From: Poul-Henning Kamp Date: Thu, 20 May 2004 12:42:16 +0200 Message-ID: <25148.1085049736@critter.freebsd.dk> Subject: some comments on geom(8) 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: Thu, 20 May 2004 10:42:41 -0000 These are merely comments and not binding in any way. The idea behind the gctl_*(9) api was to avoid class specific code in userland to the extent possible and to converge on a common command set for geom classes to make life easier and more intuitive for administrators. For a simple operation like "create", I have a hard time seeing why we need class specific code in userland. I would expect to be able to type: create stripe ad0s1 ad1s1 into geom(8) and see it construct a g_ctl containing: verb "create" class "stripe" nprovider "2" provider0 "ad0s1" provider1 "ad1s1" which I would expect the geom_stripe class in the kernel to understand. If I had typed create stripe -stripe 64 ad0s1 ad1s1 It would be: verb "create" class "stripe" nprovider "2" provider0 "ad0s1" provider1 "ad1s1" stripe "64" Similar destroy foobar should examine the XML status to find the class of the "foobar" generate something like: verb "destroy" class "foo" target "foobar" But as I said: these are non-binding comments, do it which ever way makes sense to you guys. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu May 20 03:51:34 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 F11E816A4CE for ; Thu, 20 May 2004 03:51:34 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66B6643D3F for ; Thu, 20 May 2004 03:51:34 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 2B29BACADB; Thu, 20 May 2004 12:51:10 +0200 (CEST) Date: Thu, 20 May 2004 12:51:10 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040520105110.GN845@darkness.comp.waw.pl> References: <25148.1085049736@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0kOoSRP9h7WTOD7G" Content-Disposition: inline In-Reply-To: <25148.1085049736@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org Subject: Re: some comments on geom(8) 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: Thu, 20 May 2004 10:51:35 -0000 --0kOoSRP9h7WTOD7G Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2004 at 12:42:16PM +0200, Poul-Henning Kamp wrote: +>=20 +> These are merely comments and not binding in any way. +>=20 +> The idea behind the gctl_*(9) api was to avoid class specific code +> in userland to the extent possible and to converge on a common command +> set for geom classes to make life easier and more intuitive for +> administrators. +>=20 +> For a simple operation like "create", I have a hard time seeing why +> we need class specific code in userland. +>=20 +> I would expect to be able to type: +>=20 +> create stripe ad0s1 ad1s1 +>=20 +> into geom(8) and see it construct a g_ctl containing: +>=20 +> verb "create" +> class "stripe" +> nprovider "2" +> provider0 "ad0s1" +> provider1 "ad1s1" +>=20 +> which I would expect the geom_stripe class in the kernel to understand. +>=20 +> If I had typed +>=20 +> create stripe -stripe 64 ad0s1 ad1s1 +>=20 +> It would be: +>=20 +> verb "create" +> class "stripe" +> nprovider "2" +> provider0 "ad0s1" +> provider1 "ad1s1" +> stripe "64" +>=20 +> Similar +> destroy foobar +> should examine the XML status to find the class of the "foobar" +> generate something like: +>=20 +> verb "destroy" +> class "foo" +> target "foobar" +>=20 +> But as I said: these are non-binding comments, do it which ever=20 +> way makes sense to you guys. I agree, but I've found it quite hard to implement, because for example in CONCAT and STRIPE class there are two ways to create it: manual way and auto-configuration way. In your example we have to interpret keywords in kernel and we can't provide 'usage' without communicating with kernel part. Also to all commands I want to pass to the kernel, for example: 'gconcat label', 'gconcat clear'. I think geom(8) stays in the middle. It is very easy to write class-specific utility and if it works like your example one have to only prepare one structure with commands and options description and no code at all. I want to send more detailed description on current@ after commiting manual pages. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --0kOoSRP9h7WTOD7G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFArI2eForvXbEpPzQRAjbxAJ9w06rE+BiKqWCFtepY4LC2uhv0ggCdHqfp /zb1txqQ23W8Rzx83JOQ/KM= =/UZd -----END PGP SIGNATURE----- --0kOoSRP9h7WTOD7G-- From owner-freebsd-geom@FreeBSD.ORG Thu May 20 05:11:41 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E72216A4CE; Thu, 20 May 2004 05:11:41 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3103343D1F; Thu, 20 May 2004 05:11:41 -0700 (PDT) (envelope-from arved@FreeBSD.org) Received: from freefall.freebsd.org (arved@localhost [127.0.0.1]) i4KCBSos091376; Thu, 20 May 2004 05:11:28 -0700 (PDT) (envelope-from arved@freefall.freebsd.org) Received: (from arved@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4KCBSQF091372; Thu, 20 May 2004 05:11:28 -0700 (PDT) (envelope-from arved) Date: Thu, 20 May 2004 05:11:28 -0700 (PDT) From: Tilman Linneweh Message-Id: <200405201211.i4KCBSQF091372@freefall.freebsd.org> To: arved@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: kern/60247: mutex problems in geom_io 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: Thu, 20 May 2004 12:11:41 -0000 Synopsis: mutex problems in geom_io Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: arved Responsible-Changed-When: Thu May 20 05:10:18 PDT 2004 Responsible-Changed-Why: Assign to freebsd-geom mailinglist for evaluation http://www.freebsd.org/cgi/query-pr.cgi?pr=60247 From owner-freebsd-geom@FreeBSD.ORG Thu May 20 08:06:08 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F4FD16A4CF; Thu, 20 May 2004 08:06:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BEB343D39; Thu, 20 May 2004 08:06:08 -0700 (PDT) (envelope-from phk@FreeBSD.org) Received: from freefall.freebsd.org (phk@localhost [127.0.0.1]) i4KF67Wv010090; Thu, 20 May 2004 08:06:07 -0700 (PDT) (envelope-from phk@freefall.freebsd.org) Received: (from phk@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4KF67oX010086; Thu, 20 May 2004 08:06:07 -0700 (PDT) (envelope-from phk) Date: Thu, 20 May 2004 08:06:07 -0700 (PDT) From: Poul-Henning Kamp Message-Id: <200405201506.i4KF67oX010086@freefall.freebsd.org> To: dirk.meyer@dinoex.sub.org, phk@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: kern/60247: mutex problems in geom_io 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: Thu, 20 May 2004 15:06:08 -0000 Synopsis: mutex problems in geom_io State-Changed-From-To: open->analyzed State-Changed-By: phk State-Changed-When: Thu May 20 08:05:14 PDT 2004 State-Changed-Why: This is a bug in vinum which has previously been identified. It is not legal to sleep in the disk-I/O path and vinum will use malloc(M_WAITOK) in certain error-handling code paths. http://www.freebsd.org/cgi/query-pr.cgi?pr=60247 From owner-freebsd-geom@FreeBSD.ORG Thu May 20 12:16:04 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2E9D16A4CE; Thu, 20 May 2004 12:16:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B64AA43D58; Thu, 20 May 2004 12:16:04 -0700 (PDT) (envelope-from le@FreeBSD.org) Received: from freefall.freebsd.org (le@localhost [127.0.0.1]) i4KJG49d037153; Thu, 20 May 2004 12:16:04 -0700 (PDT) (envelope-from le@freefall.freebsd.org) Received: (from le@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4KJG4uR037149; Thu, 20 May 2004 12:16:04 -0700 (PDT) (envelope-from le) Date: Thu, 20 May 2004 12:16:04 -0700 (PDT) From: Lukas Ertl Message-Id: <200405201916.i4KJG4uR037149@freefall.freebsd.org> To: le@FreeBSD.org, freebsd-geom@FreeBSD.org, le@FreeBSD.org Subject: Re: kern/60247: mutex problems in geom_io 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: Thu, 20 May 2004 19:16:04 -0000 Synopsis: mutex problems in geom_io Responsible-Changed-From-To: freebsd-geom->le Responsible-Changed-By: le Responsible-Changed-When: Thu May 20 12:15:56 PDT 2004 Responsible-Changed-Why: I'll have a look at this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=60247 From owner-freebsd-geom@FreeBSD.ORG Thu May 20 12:28:55 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 AA16C16A4CE; Thu, 20 May 2004 12:28:55 -0700 (PDT) Received: from mail.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14CE543D48; Thu, 20 May 2004 12:28:55 -0700 (PDT) (envelope-from le@FreeBSD.org) Received: from wireless (adslle.cc.univie.ac.at [131.130.102.11]) by mail.univie.ac.at (8.12.10/8.12.10) with ESMTP id i4KJShhS392794; Thu, 20 May 2004 21:28:46 +0200 Date: Thu, 20 May 2004 21:28:46 +0200 (CEST) From: Lukas Ertl To: Pawel Jakub Dawidek In-Reply-To: <20040519161957.GA845@darkness.comp.waw.pl> Message-ID: <20040520212020.Q643@korben> References: <20040519165626.W4275@pcle2.cc.univie.ac.at> <20040519161957.GA845@darkness.comp.waw.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mx7.univie.ac.at 4248; Body=3 Fuz1=3 Fuz2=3 cc: geom@FreeBSD.org cc: Poul-Henning Kamp Subject: Re: 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: Thu, 20 May 2004 19:28:55 -0000 On Wed, 19 May 2004, Pawel Jakub Dawidek wrote: > Here is the patch: > > http://people.freebsd.org/~pjd/patches/g_unload_class.patch > > UNTESTED. Lukas, could you try it and see if it fix your problem. > The whole trick could a g_waitidle() after calling destroy_geom method. Thanks Pawel, but unfortunately, it didn't work out. I subclass the geom_slice class and end up in a panic in g_slice_spoiled() - the geom's consumers have already been destroyed, but the providers have not (if I check for a NULL cp in g_slice_spoiled I end up in an infinite loop, since the geom isn't "empty"). I'm not sure how g_waitidle() can help here, since I don't see where g_pending_events is incremented/decremented in that path. The last relevant thing I see in the g_topology trace is the call to g_orphan_provider(). I haven't found out yet why g_orphan_register isn't called, which would solve the problem, I guess. cheers, le -- Lukas Ertl http://mailbox.univie.ac.at/~le/ le@FreeBSD.org http://people.freebsd.org/~le/ From owner-freebsd-geom@FreeBSD.ORG Fri May 21 15:33:34 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 377DC16A4DB for ; Fri, 21 May 2004 15:33:34 -0700 (PDT) Received: from imap.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 410C443D41 for ; Fri, 21 May 2004 15:33:33 -0700 (PDT) (envelope-from le@FreeBSD.org) Received: from wireless (adslle.cc.univie.ac.at [131.130.102.11]) by imap.univie.ac.at (8.12.10/8.12.10) with ESMTP id i4LMXHlg1070856; Sat, 22 May 2004 00:33:18 +0200 Date: Sat, 22 May 2004 00:33:20 +0200 (CEST) From: Lukas Ertl To: Pawel Jakub Dawidek In-Reply-To: <20040520212020.Q643@korben> Message-ID: <20040522003159.V3510@korben> References: <20040519165626.W4275@pcle2.cc.univie.ac.at> <20040519161957.GA845@darkness.comp.waw.pl> <20040520212020.Q643@korben> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mailbox 4247; Body=3 Fuz1=3 Fuz2=3 cc: geom@FreeBSD.org cc: Poul-Henning Kamp Subject: Re: 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: Fri, 21 May 2004 22:33:34 -0000 On Thu, 20 May 2004, Lukas Ertl wrote: > Thanks Pawel, but unfortunately, it didn't work out. I subclass the > geom_slice class and end up in a panic in g_slice_spoiled() [...] BTW, you might be able to reproduce this behaviour with geom_vol_ffs, which also subclasses the geom_slice code. Just add some volume labels to your filesystems with tunefs -L and then load and unload geom_vol_ffs. cheers, le -- Lukas Ertl http://homepage.univie.ac.at/l.ertl/ le@FreeBSD.org http://people.freebsd.org/~le/