From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 12 05:23:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2192816A4CE for ; Mon, 12 Jan 2004 05:23:39 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2504F43D2F for ; Mon, 12 Jan 2004 05:23:34 -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 i0CDNQ2n002763; Mon, 12 Jan 2004 14:23:31 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Martin Nilsson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 12 Jan 2004 13:48:27 +0100." <4002979B.1070306@gneto.com> Date: Mon, 12 Jan 2004 14:23:26 +0100 Message-ID: <2762.1073913806@critter.freebsd.dk> cc: hackers@FreeBSD.org Subject: Re: GEOM programming resources? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2004 13:23:39 -0000 In message <4002979B.1070306@gneto.com>, Martin Nilsson writes: >I read the GEOM manpage in 5.2, have looked at your webpage >(http://people.freebsd.org/~phk) and have found a paper and some slides. I'm afraid that you have pretty much discovered what there is at this point in time. Kirk is updating the daemon-book, and the text I've seen about GEOM there is a very good overview. What's missing a this time is the document people like you would sit down and read and that has yet to be even started, and I would seriously doubt that it ever happens. (It's important to understand that writing a class for GEOM is not rocket science. It's new, yes, but not harder than anything else in the kernel.) I've tried to make geom classes of various sorts so there would be plenty for people to look at, depending on their application. In the case of vinum, the most applicable prior art is geom_ccd which does many of the same things. Basically, the way I would advocate you go about this is the following steps: 1. Add a geom_vinum class and get it to hook into GEOM (check the XML from "sysctl -b kern.geom.confxml" to see that it happens.) 2. Add a "taste function", and get it to recognize vinum metadata, and subsequently get autoconfiguration to work. (CCD doesn't have this, look instead in geom_mirror.c). 3. Make vinum use the consumers constructed in #2 to issue down-wards I/O requests. 4. Change the upper side of vinum to publish "providers" and service I/O requests on those instead of the current cdevsw. Don't be mislead by these four easy steps, there is a lot of stuff to do in vinum to get these done, a lot of then undoing things as Greg has already remarked, but if you do it in this order, GEOM will not be your biggest problem in this. -- 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.