Fix for prematurely stopping on verify
Commit 20876c53 added a total byte check, but forgot to
account for potential verification bytes. Fix that.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/backend.c b/backend.c
index bf9d066..3ac72e7 100644
--- a/backend.c
+++ b/backend.c
@@ -642,7 +642,7 @@
uint64_t bytes_done[DDIR_RWDIR_CNT] = { 0, 0, 0 };
unsigned int i;
int ret = 0;
- uint64_t bytes_issued = 0;
+ uint64_t total_bytes, bytes_issued = 0;
if (in_ramp_time(td))
td_set_runstate(td, TD_RAMP);
@@ -651,6 +651,10 @@
lat_target_init(td);
+ total_bytes = td->o.size;
+ if (td->o.verify != VERIFY_NONE && td_write(td))
+ total_bytes += td->o.size;
+
while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) ||
(!flist_empty(&td->trim_list)) || !io_bytes_exceeded(td) ||
td->o.time_based) {
@@ -678,7 +682,7 @@
if (flow_threshold_exceeded(td))
continue;
- if (bytes_issued >= (uint64_t) td->o.size)
+ if (bytes_issued >= total_bytes)
break;
io_u = get_io_u(td);