Error checking for g_mod_event() and friends
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Jan 27 07:46:29 PST 2004
In message <20040127163829.I92925 at pcle2.cc.univie.ac.at>, Lukas Ertl writes:
>On Tue, 27 Jan 2004, Poul-Henning Kamp wrote:
>
>> In message <20040127160001.N92925 at pcle2.cc.univie.ac.at>, Lukas Ertl writes:
>> >
>> >In the geom_vinum case I allocate the "main" vinum geom in the init
>> >method, and this might fail.
>> >
>> >(Of course, this might not be the correct way to do it, but I couldn't
>> >think of another way.)
>>
>> You're right, it isn't :-)
>>
>> You should never allocate anything until you first time taste a disk
>> which looks like yours.
>
>Ok, then how do I spawn a complete class from the tasting routine of
>another class?
You don't.
You initialize the classes when they are loaded. Once you taste
something you like, you start creating "übergeom"s and what else
you need.
--
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