Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2004 14:23:26 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Martin Nilsson <martin@gneto.com>
Cc:        hackers@FreeBSD.org
Subject:   Re: GEOM programming resources? 
Message-ID:  <2762.1073913806@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 12 Jan 2004 13:48:27 %2B0100." <4002979B.1070306@gneto.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2762.1073913806>