Date: Fri, 26 Mar 2004 12:00:46 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Lukas Ertl <le@FreeBSD.org> Subject: Re: Problem with g_unload_class() Message-ID: <20040326110046.GD8930@darkness.comp.waw.pl> In-Reply-To: <1264.1080298514@critter.freebsd.dk> References: <20040322211631.S636@korben.in.tern> <1264.1080298514@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--/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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040326110046.GD8930>