kern/157724: [geom] gpart(8) 'add' command must preserve gap for schemes

Marcel Moolenaar marcel at xcllnt.net
Mon Jun 27 18:27:22 UTC 2011


On Jun 27, 2011, at 11:21 AM, Andrey V. Elsukov wrote:

> On 27.06.2011 22:10, Marcel Moolenaar wrote:
>>>> There isn't a lot we can do about it. This is one of those
>>>> historical mistakes that you can't fix without breaking with
>>>> 30+ years of history. It's not worth the hassle IMO...
>>> 
>>> Hi, Marcel
>>> 
>>> I think we can just set gpt_first = 16 in g_part_bsd_create for new
>>> tables and for existing tables also set gpt_first = 16 if all partitions
>>> don not use this space. Something like this (untested):
>> 
>> You may want to look at /etc/disktab. Are you willing to
>> change all entries and deal with the consequences? :-)
> 
> I do not see any problems here especially for gpart(8).
> bsdlabel(8) does not use gpart(8), it still can write label directly to
> the provider and it will be detected as before.

You're creating inconsistent behaviour between bsdlabel and gpart
and that will result in PRs. Whatever you do, keep consistency.
If you really want to change the default behaviour of gpart, I
suggest you first get rid of bsdlabel, fdisk, et al...

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the freebsd-geom mailing list