Re: 8.0-BETA1 bsdlabel broken?

From: Marcel Moolenaar <xcllnt_at_mac.com>
Date: Fri, 10 Jul 2009 10:15:27 -0700
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_at_mac.com
Received on Fri Jul 10 2009 - 15:15:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:51 UTC