[PATCH v2 2/2] stat: report zone reset count in json output format

Shin'ichiro Kawasaki <[email protected]> Thu, 9 Oct 2025 11:39:28 +0900
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
When --output-format=json option is specified, fio currently does not
report the zone reset count even when zbd zonemode is specified. To
report it, add the new item "zone_resets" to the json output format.

Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
---
 stat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stat.c b/stat.c
index 76b74b3c..a67d3551 100644
--- a/stat.c
+++ b/stat.c
@@ -1946,6 +1946,10 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts,
 		json_object_add_value_array(data, "bw", bw);
 	}
 
+	if (ts->count_zone_resets)
+		json_object_add_value_int(root, "zone_resets",
+					  ts->nr_zone_resets);
+
 	return root;
 }
 
-- 
2.49.0