HomeFreeBSD

Fix zpool iostat bandwidth/ops calculation

Description

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

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Mar 2 2016, 8:57 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 9 2016, 1:43 AM
Parents
rGc53fb0113cc3: Add support for alpine linux
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG272be6834c39: Fix zpool iostat bandwidth/ops calculation (authored by Tony Hutter <hutter2@llnl.gov>).Mar 9 2016, 1:43 AM