Dashes for zero latency values in zpool iostat -p

This prints dashes instead of zeros for zero latency values in
'zpool iostat -p'.  You'll get zero latencies reported when the
disk is idle, but technically a zero latency is invalid, since you
can't measure the latency of doing nothing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #6210
This commit is contained in:
Tony Hutter
2017-06-22 09:39:01 -07:00
committed by Brian Behlendorf
parent d9ad3fea3b
commit 29eb494285
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -3460,7 +3460,7 @@ print_iostat_latency(iostat_cbdata_t *cb, nvlist_t *oldnv,
nva = calc_and_alloc_stats_ex(names, ARRAY_SIZE(names), oldnv, newnv);
if (cb->cb_literal)
format = ZFS_NICENUM_RAW;
format = ZFS_NICENUM_RAWTIME;
else
format = ZFS_NICENUM_TIME;