Don't assume read IO are always verifies if verify is enabled
authorJens Axboe <jens.axboe@oracle.com>
Fri, 4 Sep 2009 18:53:53 +0000 (20:53 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 4 Sep 2009 18:53:53 +0000 (20:53 +0200)
If it's a mixed read/write workload, we're likely just wanting to
verify the writes we do.

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

diff --git a/fio.c b/fio.c
index dfd15e0f5db1e943a9aec595454cf1f601e97fea..3a9a3badff0fddefbe9d4f0dca22768c52137c25 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -606,7 +606,8 @@ static void do_io(struct thread_data *td)
                 * Add verification end_io handler, if asked to verify
                 * a previously written file.
                 */
-               if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ) {
+               if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ &&
+                   !td_rw(td)) {
                        if (td->o.verify_async)
                                io_u->end_io = verify_io_u_async;
                        else