More precise fix for verify_backlog verification failure
authorJens Axboe <axboe@fb.com>
Wed, 5 Feb 2014 20:15:22 +0000 (13:15 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 5 Feb 2014 20:15:22 +0000 (13:15 -0700)
Commit c2703bf3 could be a bit more precise - we only need to
add to the byte count if verify_backlog is enabled, since that
is the case where do_io() will run both the IO and verify IO.

Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c

index 8450957543ed2c466a2de78029f01538cfd39f2e..62fa17c3a209665252a25e322aa084b15ce86c25 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -651,8 +651,14 @@ static uint64_t do_io(struct thread_data *td)
 
        lat_target_init(td);
 
+       /*
+        * If verify_backlog is enabled, we'll run the verify in this
+        * handler as well. For that case, we may need up to twice the
+        * amount of bytes.
+        */
        total_bytes = td->o.size;
-       if (td->o.verify != VERIFY_NONE && td_write(td))
+       if (td->o.verify != VERIFY_NONE &&
+          (td_write(td) && td->o.verify_backlog))
                total_bytes += td->o.size;
 
        while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) ||