From 1a32adca0fb2ada6f733355100d207b03e8e6c54 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Wed, 1 Oct 2025 09:16:13 +1000 Subject: [PATCH] zpool iostat: update pool counter when skipping boot row When skipping the boot row (with -y), the early loop meant we weren't updating the "last_npools" count. That means the count never advanced past zero, so cb_iteration was always reset to 0, leading to it being "stuck" on the boot line, printing the header and nothing else forever. Updating the pool counter on every loop sorts that out: it advances, cb_iteration moves properly, and normal rows are printed. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #17807 --- cmd/zpool/zpool_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 286336cf2..1feec55c0 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -6677,6 +6677,7 @@ zpool_do_iostat(int argc, char **argv) if (skip) { (void) fflush(stdout); (void) fsleep(interval); + last_npools = npools; continue; }