From owner-freebsd-geom@FreeBSD.ORG Thu May 20 03:51:34 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 F11E816A4CE for ; Thu, 20 May 2004 03:51:34 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66B6643D3F for ; Thu, 20 May 2004 03:51:34 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 2B29BACADB; Thu, 20 May 2004 12:51:10 +0200 (CEST) Date: Thu, 20 May 2004 12:51:10 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040520105110.GN845@darkness.comp.waw.pl> References: <25148.1085049736@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0kOoSRP9h7WTOD7G" Content-Disposition: inline In-Reply-To: <25148.1085049736@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org Subject: Re: some comments on geom(8) 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: Thu, 20 May 2004 10:51:35 -0000 --0kOoSRP9h7WTOD7G Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2004 at 12:42:16PM +0200, Poul-Henning Kamp wrote: +>=20 +> These are merely comments and not binding in any way. +>=20 +> The idea behind the gctl_*(9) api was to avoid class specific code +> in userland to the extent possible and to converge on a common command +> set for geom classes to make life easier and more intuitive for +> administrators. +>=20 +> For a simple operation like "create", I have a hard time seeing why +> we need class specific code in userland. +>=20 +> I would expect to be able to type: +>=20 +> create stripe ad0s1 ad1s1 +>=20 +> into geom(8) and see it construct a g_ctl containing: +>=20 +> verb "create" +> class "stripe" +> nprovider "2" +> provider0 "ad0s1" +> provider1 "ad1s1" +>=20 +> which I would expect the geom_stripe class in the kernel to understand. +>=20 +> If I had typed +>=20 +> create stripe -stripe 64 ad0s1 ad1s1 +>=20 +> It would be: +>=20 +> verb "create" +> class "stripe" +> nprovider "2" +> provider0 "ad0s1" +> provider1 "ad1s1" +> stripe "64" +>=20 +> Similar +> destroy foobar +> should examine the XML status to find the class of the "foobar" +> generate something like: +>=20 +> verb "destroy" +> class "foo" +> target "foobar" +>=20 +> But as I said: these are non-binding comments, do it which ever=20 +> way makes sense to you guys. I agree, but I've found it quite hard to implement, because for example in CONCAT and STRIPE class there are two ways to create it: manual way and auto-configuration way. In your example we have to interpret keywords in kernel and we can't provide 'usage' without communicating with kernel part. Also to all commands I want to pass to the kernel, for example: 'gconcat label', 'gconcat clear'. I think geom(8) stays in the middle. It is very easy to write class-specific utility and if it works like your example one have to only prepare one structure with commands and options description and no code at all. I want to send more detailed description on current@ after commiting manual pages. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --0kOoSRP9h7WTOD7G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFArI2eForvXbEpPzQRAjbxAJ9w06rE+BiKqWCFtepY4LC2uhv0ggCdHqfp /zb1txqQ23W8Rzx83JOQ/KM= =/UZd -----END PGP SIGNATURE----- --0kOoSRP9h7WTOD7G--