From owner-freebsd-geom@FreeBSD.ORG Tue Jan 27 07:46:29 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 9C27E16A4CE for ; Tue, 27 Jan 2004 07:46:29 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 107A743D77 for ; Tue, 27 Jan 2004 07:45:57 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id i0RFjuuO005277; Tue, 27 Jan 2004 16:45:56 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Lukas Ertl From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 27 Jan 2004 16:39:01 +0100." <20040127163829.I92925@pcle2.cc.univie.ac.at> Date: Tue, 27 Jan 2004 16:45:56 +0100 Message-ID: <5276.1075218356@critter.freebsd.dk> cc: freebsd-geom@freebsd.org Subject: Re: Error checking for g_mod_event() and friends 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: Tue, 27 Jan 2004 15:46:29 -0000 In message <20040127163829.I92925@pcle2.cc.univie.ac.at>, Lukas Ertl writes: >On Tue, 27 Jan 2004, Poul-Henning Kamp wrote: > >> In message <20040127160001.N92925@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@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.