Date: Fri, 26 Mar 2004 12:18:12 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: Lukas Ertl <le@FreeBSD.org> Subject: Re: Problem with g_unload_class() Message-ID: <1621.1080299892@critter.freebsd.dk> In-Reply-To: Your message of "Fri, 26 Mar 2004 12:00:46 %2B0100." <20040326110046.GD8930@darkness.comp.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20040326110046.GD8930@darkness.comp.waw.pl>, Pawel Jakub Dawidek wr ites: >+> 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; But that is exactly the "silly" scenario I would like to avoid: Now you have removed some of the geom instances an you have nuked the taste and config function and then you give up and leave the class still loaded. We may need to move to a "can?/commit!" like two-phase protocol. (see geom_stripe for another place where this is used) -- 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1621.1080299892>