Clear ->rate_bytes on do_io() loop
authorJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 07:02:10 +0000 (08:02 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 07:02:10 +0000 (08:02 +0100)
We don't do rates across loops, so remember to clear ->rate_bytes
when we start a new loop.

Problem report from "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 36dde3a6562ea06ce35ae07ba14c94ce2e3f5a3f..cc65e3d0cf197ec46b978283b4c754d4cdf5f396 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -636,6 +636,7 @@ static int clear_io_state(struct thread_data *td)
        td->ts.stat_io_bytes[0] = td->ts.stat_io_bytes[1] = 0;
        td->this_io_bytes[0] = td->this_io_bytes[1] = 0;
        td->zone_bytes = 0;
+       td->rate_bytes = 0;
 
        td->last_was_sync = 0;