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

Alan Somers <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <CAOtMX2ijafn012EnmWtUGmOQoRRC3SZEd2=F8L4FmZ0MxoaAqA__37809.3953522452$1786923129$gmane$org@mail.gmail.com>
Yes, it probably would.

On Sun, Aug 16, 2026 at 3:25 PM Ronald Klop <[email protected]> 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 <[email protected]>
> Datum: 16 augustus 2026 21:16
> Aan: [email protected], [email protected], [email protected]
> CC: voidanix <[email protected]>
> 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,
>
> ________________________________
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.