stat: report zone reset count only when zonemode is set to zbd
Currently, fio reports the zone reset count regardless of whether the
zbd zonemode is specified. Reporting the zone reset count lacking the
zbd zonemode is irrelevant and unnecessary.
Suppress the zone reset count report unless the zbd zonemode is
specified. For that purpose, introduce the new flag "count_zone_resets"
to the struct thread_stat. To maintain 32-bit alignment of the struct,
repurpose the existing "pad3" field to allocate the flag. To group the
related fields together, move the field "nr_zone_resets" and
"latency_depth" within the struct. Make corresponding adjustments in the
relevant functions fio_server_send_ts() and convert_ts(). Bump up
FIO_SERVER_VER since these changes affect the struct cmd_ts_pdu that is
sent out from fio server.
Set the flag count_zone_resets only when the zbd zonemode is set, and
the workload is write or trim. Refer to the flag in show_ddir_status()
to determine if the zone reset count should be reported. Also refer to
the flag in sum_thread_stats() to decide if the nr_zone_resets field
should be summed up.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 files changed