From owner-freebsd-geom@FreeBSD.ORG Fri Mar 26 03:00:50 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 65FFB16A4CE; Fri, 26 Mar 2004 03:00:50 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8675F43D41; Fri, 26 Mar 2004 03:00:47 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 109DDACAF8; Fri, 26 Mar 2004 12:00:46 +0100 (CET) Date: Fri, 26 Mar 2004 12:00:46 +0100 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040326110046.GD8930@darkness.comp.waw.pl> References: <20040322211631.S636@korben.in.tern> <1264.1080298514@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/ZPAxgSw4JMezHmq" Content-Disposition: inline In-Reply-To: <1264.1080298514@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: 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 11:00:50 -0000 --/ZPAxgSw4JMezHmq Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 26, 2004 at 11:55:14AM +0100, Poul-Henning Kamp wrote: +> Hi, this just to say that I have not forgot you. +>=20 +> The underlying problem is how we want unloading to work. There are two +> sensible an one bad way it could work: +>=20 +> sensible 1: +> "I tried to unload, but couldn't, nothing has changed". +>=20 +> sensible 2: +> "I forcefully unloaded, you probably lost some data" +>=20 +> silly: +> "I couldn't unload and couldn't. A lot of stuff got modified +> and the module is now only half functional. +>=20 +> I'd prefer we have it be the first two (controlled by an option) but +> currently we're sort of stuck in the bottom one. My idea is to use LIST_FOREACH_SAFE() macro, like I did in my old patch: http://people.freebsd.org/~pjd/patches/geom_subr.c.11.patch And maybe we should add: if (!LIST_EMPTY(&mp->geom)) error =3D EBUSY; after this loop. With this change we don't leave objects from class that was unloaded and we'll not end up with an infinite loop. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --/ZPAxgSw4JMezHmq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAZA1eForvXbEpPzQRAvWDAKDQYXs0W3ZLsC3VcKJ4XTlw3Ni3LgCdG+aY hYNeS5MgJwFStyv5aMXBxgw= =IsKK -----END PGP SIGNATURE----- --/ZPAxgSw4JMezHmq--