Fix initialization of lastrate when using ratemin
authorJosh Carter <public@joshcarter.com>
Tue, 22 Nov 2011 08:35:29 +0000 (09:35 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 22 Nov 2011 08:35:29 +0000 (09:35 +0100)
commit8a3220572e1016ea011bd9dcf61a5bfb731c1a43
tree25ac838e47baa4cca22368dc0a9777f6613929b9
parent068420271828b3b2426ffc3ccf64404cb9d340fb
Fix initialization of lastrate when using ratemin

fio was copying td->bw_sample_time (single timeval) into td->lastrate
(array of two timevals) using the latter's size. Thus is would get one
timeval worth of good data plus who-knows-what for the second timeval.
I'm pretty sure the intent of this code was to copy bw_sample_time
into both members of lastrate.

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