Re: git: 95a4412e3a4d - main - zonectl: Consistently report ZAC conv. zones WP LBA

From: Alan Somers <asomers_at_freebsd.org>
Date: Sun, 16 Aug 2026 23:31:29 UTC
Yes, it probably would.

On Sun, Aug 16, 2026 at 3:25 PM Ronald Klop <ronald-lists@klop.ws> wrote:
>
> Would it be helpful for future readers of the code to have a constant defined for these? Instead of 2 “magic” values.
>
> Regards,
> Ronald
>
> Van: Alan Somers <asomers@FreeBSD.org>
> Datum: 16 augustus 2026 21:16
> Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
> CC: voidanix <voidanix@freebsd.org>
> Onderwerp: git: 95a4412e3a4d - main - zonectl: Consistently report ZAC conv. zones WP LBA
>
> The branch main has been updated by asomers:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=95a4412e3a4d41b430f298ea2c2a51f8aa119c2c
>
> commit 95a4412e3a4d41b430f298ea2c2a51f8aa119c2c
> Author:     voidanix
> AuthorDate: 2026-07-30 23:50:32 +0000
> Commit:     Alan Somers
> CommitDate: 2026-08-16 19:15:33 +0000
>
>     zonectl: Consistently report ZAC conv. zones WP LBA
>
>     On ZAC drives, conventional zones conventionally report a write pointer
>     LBA of 0xffffffffffff. This field is 48 bits wide, unlike ZBC's 64 bits.
>
>     Recognize both ZAC and ZBC all-ones behaviour in the WRITE POINTER LBA
>     field to indicate non-valid information.
>
>     Tested by:      fuz
>     Discussed with: fuz, asomers, ken
>     Fixes:          4735ef6196bc ("zonectl: display conventional zones better")
>     MFC after:      2 weeks
>     Sponsored by:   Google Summer Of Code 2026
>     Reviewed by:    asomers
>     Pull Request:   https://github.com/freebsd/freebsd-src/pull/2345
> ---
>  usr.sbin/zonectl/zonectl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/usr.sbin/zonectl/zonectl.c b/usr.sbin/zonectl/zonectl.c
> index 9dc6ddfd1aae..462353cd58ef 100644
> --- a/usr.sbin/zonectl/zonectl.c
> +++ b/usr.sbin/zonectl/zonectl.c
> @@ -292,7 +292,8 @@ zonectl_print_rz(struct disk_zone_report *report, zone_output_flags out_flags,
>             (uintmax_t)entry->zone_start_lba,
>             field_widths[ZONE_FW_LEN],
>             (uintmax_t)entry->zone_length);
> -       if (entry->write_pointer_lba == 0xffffffffffffffff) {
> +       if (entry->write_pointer_lba == 0xffffffffffff ||
> +           entry->write_pointer_lba == 0xffffffffffffffff) {
>             /*
>              * This value is reported by HDDs for conventional
>              * zones.  It really means "N/A".  Reported it as -1,
>
> ________________________________
>
>
>
>