Fix verify_only option not working properly
authorPuthikorn Voravootivat <puthik@chromium.org>
Mon, 3 Mar 2014 23:33:32 +0000 (15:33 -0800)
committerJens Axboe <axboe@fb.com>
Mon, 3 Mar 2014 23:48:13 +0000 (15:48 -0800)
In commit c4b6117, we changed the place to call log_io_piece but
the new place won't be reached when using verify_only option so
that when we run with the verify_only option, fio won't verify
anything at all.

This patch fix that by also call the log_io_piece in the do_dry_run
function for the verify_only code path.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c

index 72d9d6d..992033c 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1196,6 +1196,12 @@ static uint64_t do_dry_run(struct thread_data *td)
                        td->ts.total_io_u[io_u->ddir]++;
                }
 
+               if (td_write(td) && io_u->ddir == DDIR_WRITE &&
+                   td->o.do_verify &&
+                   td->o.verify != VERIFY_NONE &&
+                   !td->o.experimental_verify)
+                       log_io_piece(td, io_u);
+
                ret = io_u_sync_complete(td, io_u, bytes_done);
                (void) ret;
        }