]> granicus.if.org Git - zfs/commit
Fix zpool iostat bandwidth/ops calculation
authorTony Hutter <hutter2@llnl.gov>
Wed, 2 Mar 2016 20:57:06 +0000 (12:57 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 9 Mar 2016 01:43:33 +0000 (17:43 -0800)
commit272be6834c3989f13c51f65eba6ec1d776a0ad43
tree20bd8c40b09f9f818106f1f1acf1ae5eed5ce433
parentc53fb0113cc372ed8df3c08f59f83cb3ceee849b
Fix zpool iostat bandwidth/ops calculation

print_vdev_stats() subtracts the old bandwidth/ops stats from the new stats
to calculate the bandwidth/ops numbers in "zpool iostat".  However when the
TXG numbers change between stats, zpool_refresh_stats() will incorrectly assign
a NULL to the old stats. This causes print_vdev_stats() to use zeroes for
the old bandwidth/ops numbers, resulting in an inaccurate calculation.

This fix allows the calculation to happen even when TXGs change.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4387
lib/libzfs/libzfs_config.c