Fix bandwidth logging for mixed read/write workloads.
authorJosh Carter <public@joshcarter.com>
Mon, 20 Feb 2012 09:12:22 +0000 (10:12 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Feb 2012 09:12:22 +0000 (10:12 +0100)
commit5daa4ebed724cb0223dac4a1386e068f59722dab
treebd109b06e99fb6565562b9eaf5a39bceb8916c67
parente43606c2b13ad7fc1af2bbe4a61cf8480ee3a532
Fix bandwidth logging for mixed read/write workloads.

fio was maintaining separate read/write stats, but only one timer for
bw_avg_time. Whichever IO direction happened to cross the timer would
get its interval logged; the other data direction would not. Now both
ddir are logged each time we cross bw_avg_time.

Where intervals don't contain any activity in a given ddir, no log
entry is made.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c