From owner-freebsd-geom@FreeBSD.ORG Mon Oct 20 20:21:39 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1B9106566B for ; Mon, 20 Oct 2008 20:21:39 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD128FC16 for ; Mon, 20 Oct 2008 20:21:39 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by wa-out-1112.google.com with SMTP id n4so1109981wag.27 for ; Mon, 20 Oct 2008 13:21:38 -0700 (PDT) Received: by 10.114.39.5 with SMTP id m5mr5750491wam.113.1224534098466; Mon, 20 Oct 2008 13:21:38 -0700 (PDT) Received: by 10.115.89.3 with HTTP; Mon, 20 Oct 2008 13:21:38 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 22:21:38 +0200 From: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" To: "Marcel Moolenaar" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-geom@freebsd.org Subject: Re: How to get the partition number of a GPT partition from the geom? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 20:21:39 -0000 On Mon, Oct 20, 2008 at 9:45 PM, Marius N=FCnnerich wr= ote: > Hi Marcel, > > thanks for your reply. > > On Mon, Oct 20, 2008 at 9:09 PM, Marcel Moolenaar wrote: >> >> On Oct 20, 2008, at 10:55 AM, Marius N=FCnnerich wrote: >> >>> A new question popped up: >>> Is it possible to test the a geom of class PART is of "subclass" GPT? >> >> >> Not easily from the kernel now, but it's always possible to make >> certain bits of information more readily available for use inside >> the kernel. >> >> It seems to make sense to have GEOMs export label information >> through g_getattr(). This allows the label to come from every >> GEOM that possibly can have labels, without the need to add >> explicit support... > > That would certainly be a clean thing to do. > I'll take a look into g_getattr() now, thanks. Hmm, this would not really help for GPT, since I would also like to have the partition uuid, so another attr would be needed. BIO_GETATTR is handled in g_part.c so the specific implementations never see the request. For example MBR has no label or uuid so it doesn't make sense to ask it for one. Is there some documentation why gpart was started and what it's main advantages are over the old style?