verify: verify bytes should not add to this_io_bytes
authorwebee <webee.yw@gmail.com>
Fri, 23 Mar 2012 12:41:41 +0000 (13:41 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Mar 2012 12:41:41 +0000 (13:41 +0100)
When rw=readwrite,verify+backlog, the verify are treated as normal
read, and bytes are added to this_io_bytes, cause fio terminate early.

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

diff --git a/io_u.c b/io_u.c
index a4f378d811dd87df2481db8756ee463306e44f9e..66463328dd0c3cd9667ce57095f998402da9fcf9 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1381,7 +1381,9 @@ static void io_completed(struct thread_data *td, struct io_u *io_u,
                td->io_blocks[idx]++;
                td->this_io_blocks[idx]++;
                td->io_bytes[idx] += bytes;
-               td->this_io_bytes[idx] += bytes;
+
+               if (!(io_u->flags & IO_U_F_VER_LIST))
+                       td->this_io_bytes[idx] += bytes;
 
                if (idx == DDIR_WRITE) {
                        f = io_u->file;