Problem with g_unload_class()

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Mar 26 03:48:39 PST 2004


In message <20040326114343.GG8930 at darkness.comp.waw.pl>, Pawel Jakub Dawidek wr
ites:
>
>--jk5HhkA9Kov5Oxsi
>Content-Type: text/plain; charset=iso-8859-2
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>
>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.

The solution would be to give destroy_geom() and argument
which can be one of three values:
	TEST
	COMMIT
	ABANDON

This is classical CS theory, there is no need to reinvent
the hot water or the deep plate.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at 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.


More information about the freebsd-geom mailing list