From owner-freebsd-current@FreeBSD.ORG Fri Jul 10 17:15:44 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7365C106566B for ; Fri, 10 Jul 2009 17:15:44 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id 588928FC14 for ; Fri, 10 Jul 2009 17:15:44 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KMK004XHT9TW160@asmtp029.mac.com> for freebsd-current@freebsd.org; Fri, 10 Jul 2009 10:15:30 -0700 (PDT) From: Marcel Moolenaar In-reply-to: Date: Fri, 10 Jul 2009 10:15:27 -0700 Message-id: References: <20090710042106.GC31950@rwpc12.mby.riverwillow.net.au> <20090710071023.GB32316@rwpc12.mby.riverwillow.net.au> <20090710112631.GE32316@rwpc12.mby.riverwillow.net.au> <3a142e750907100433y307f9b2bya1dc54953bdf5de2@mail.gmail.com> <0B1F6799-2FAC-4C01-A978-42E247979CAB@mac.com> <1z5niluEh3OBPNSdMbOMyoEwzX4@CWODRlDR5RMqbkBfR0/UzHcfNhE> <267A655F-13A6-4D79-A933-3A78854AC5FD@mac.com> To: rea-fbsd@codelabs.ru X-Mailer: Apple Mail (2.1068) Cc: freebsd-current@freebsd.org, John Marshall Subject: Re: 8.0-BETA1 bsdlabel broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 17:15:44 -0000 On Jul 10, 2009, at 9:55 AM, Eygene Ryabinkin wrote: > Fri, Jul 10, 2009 at 09:33:10AM -0700, Marcel Moolenaar wrote: >> >> On Jul 10, 2009, at 9:18 AM, Eygene Ryabinkin wrote: >> >>> Everything starts fine -- ad4s2 and ad4s3 are attached and create 6 >>> providers each inside g_bsd_taste. >> >> Please don't use GEOM_BSD. It's obsolete. I haven't removed >> the code out of conservatism, but consider it dead and gone. > > I had used it (you guessed right) because only it provides > the "read mbroffset" verb. At least I hadn't found another > class that gives it. And bsdlabel wants this offset. There is no need for the verb. bsdlabel should use the same logic the kernel is using: if the C partition has a non-zero offset, then the label is absolute and you can subtract that offset from all partitions to make the label relative. The verb is badly named BTTW, because it's (as usual) biased towards PCs and assumes that the BSD label is nested underneath an MBR if it's nested. In fact, the mbroffset verb is implememented in terms of 2 attributes: MBR::offset and PC98::offset. This to compensate for the PC bias. However, it's still broken: try putting a BSD disklabel inside a GPT partition and see what bsdlabel(8) says then... -- Marcel Moolenaar xcllnt@mac.com