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

Alan Somers <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm
Message-ID <[email protected]>
The branch main has been updated by asomers:

URL: https://cgit.FreeBSD.org/src/commit/?id=95a4412e3a4d41b430f298ea2c2a51f8aa119c2c

commit 95a4412e3a4d41b430f298ea2c2a51f8aa119c2c
Author:     voidanix <[email protected]>
AuthorDate: 2026-07-30 23:50:32 +0000
Commit:     Alan Somers <[email protected]>
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.