Re: 14.3-RELEASE gpart show output (?.?T) vs. 14.4 and 15.0 and main: why do 14.4 and 15.0 and main have some single significant digit (?T) size figures?
Date: Mon, 20 Apr 2026 17:16:42 UTC
> On Apr 20, 2026, at 2:48 AM, Zhenlei Huang <zlei@FreeBSD.org> wrote:
>
>
>
>> On Apr 20, 2026, at 2:03 AM, Mark Millard <marklmi@yahoo.com <mailto:marklmi@yahoo.com>> wrote:
>>
>> On 4/19/26 10:40, Zhenlei Huang wrote:
>>>
>>>
>>>> On Apr 20, 2026, at 1:11 AM, Zhenlei Huang <zlei@FreeBSD.org <mailto:zlei@FreeBSD.org>
>>>> <mailto:zlei@FreeBSD.org <mailto:zlei@FreeBSD.org>>> wrote:
>>>>
>>>>
>>>>
>>>>> On Apr 19, 2026, at 11:03 PM, Mark Millard <marklmi@yahoo.com <mailto:marklmi@yahoo.com>
>>>>> <mailto:marklmi@yahoo.com <mailto:marklmi@yahoo.com>>> wrote:
>>>>>
>>>>> 14.3-RELEASE (more useful):
>>>>>
>>>>> => 40 1875384928 da1 GPT (894G)
>>>>> => 40 2930277095 nda1 GPT (1.4T)
>>>>> => 34 2930277101 da0 GPT (1.4T)
>>>>> => 34 3907029101 nda0 GPT (1.8T)
>>>>> => 34 4000797293 nda3 GPT (1.9T)
>>>>>
>>>>>
>>>>> 14.4-RELEASE and 15.0-RELEASE and main (less useful):
>>>>>
>>>>> => 40 1875384928 da1 GPT (894G)
>>>>> => 40 2930277095 nda1 GPT (1T)
>>>>> => 34 2930277101 da0 GPT (1T)
>>>>> => 34 3907029101 nda0 GPT (2T)
>>>>> => 34 4000797293 nda3 GPT (2T)
>>>>>
>>>>
>>>> It appears to be caused by 4f809ffec69c (gpart: add libxo support for
>>>> "show" subcommand + man page updates) .
>>>>
>>>> Prior to the change the size was formatted to human friendly format by
>>>> `fmtsize(pp->lg_mediasize))` which in turn calls
>>>> ```
>>>> humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE,
>>>> HN_B | HN_NOSPACE | HN_DECIMAL);
>>>> ```,
>>>>
>>>> now it is formatted with
>>>> ```
>>>> xo_emit(" ({h:size/%jd})\n", (intmax_t)pp->lg_mediasize);
>>>> ```
>>>>
>>>> It appears that libxo does not handle well with numbers those exceed
>>>> 10^12, ( 1 Terabyte in this case ).
>>>
>>> Try this patch please, not a full fix for all the "size" column,
>>>
>>> ```
>>> Author: Zhenlei Huang <zlei@FreeBSD.org <mailto:zlei@FreeBSD.org> <mailto:zlei@FreeBSD.org <mailto:zlei@FreeBSD.org>>>
>>> Date: Mon Apr 20 01:38:21 2026 +0800
>>>
>>> geom_part: Fix the format of size
>>>
>>> diff --git a/lib/geom/part/geom_part.c b/lib/geom/part/geom_part.c
>>> index 852eec2d790a..ca3c5f2c27c3 100644
>>> --- a/lib/geom/part/geom_part.c
>>> +++ b/lib/geom/part/geom_part.c
>>> @@ -723,7 +723,7 @@ gpart_show_geom(struct ggeom *gp, const char
>>> *element, int show_providers)
>>> }
>>> if (idx)
>>> xo_emit("]");
>>> - xo_emit(" ({h:size/%jd})\n", (intmax_t)pp->lg_mediasize);
>>> + xo_emit(" ({h,hn-decimal:size/%jd})\n", (intmax_t)pp-
>>>> lg_mediasize);
>>> xo_close_instance(s);
>>> first = end + 1;
>>> }
>>> ```
>>>
>>>>
>>>>>
>>>>> --
>>>>> ===
>>>>> Mark Millard
>>>>> marklmi at yahoo.com <http://yahoo.com/> <http://yahoo.com/ <http://yahoo.com/>>
>>>>>
>>>>>
>>>>
>>>> Best regards,
>>>> Zhenlei
>>>
>>> Best regards,
>>> Zhenlei
>>>
>>
>> I'm in the middle of other building-port-packages timing tests on the
>> systems. So I'll wait on doing the above.
>
> See https://reviews.freebsd.org/D56514 <https://reviews.freebsd.org/D56514> for the full patch.
Fixed in https://cgit.freebsd.org/src/commit/?id=0d16792c6e983005581ed0176ed81e7302582196 <https://cgit.freebsd.org/src/commit/?id=0d16792c6e983005581ed0176ed81e7302582196> .
Thanks for your report !
>
>>
>>
>> --
>> ===
>> Mark Millard
>> marklmi at yahoo.com <http://yahoo.com/>
>
> Best regards,
> Zhenlei