From: Jens Axboe Date: Thu, 24 Mar 2016 19:36:22 +0000 (-0600) Subject: backend: ensure that we run verification for short time based jobs X-Git-Tag: fio-2.9~21 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=f1a32461c844c7ba9314f66dd28b5a01ca7cb69a backend: ensure that we run verification for short time based jobs We need to break out of the main loop for the case where we did exceed our bytes issued, if we have verification to run. For time based jobs, we'll get back in this loop after verification. Fixes c04e4661e4da ("time_based: Avoid restarting main I/O loop") Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index 7f57c65a..e093f75d 100644 --- a/backend.c +++ b/backend.c @@ -881,7 +881,14 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done) if (flow_threshold_exceeded(td)) continue; - if (!td->o.time_based && bytes_issued >= total_bytes) + /* + * Break if we exceeded the bytes. The exception is time + * based runs, but we still need to break out of the loop + * for those to run verification, if enabled. + */ + if (bytes_issued >= total_bytes && + (!td->o.time_based || + (td->o.time_based && td->o.verify != VERIFY_NONE))) break; io_u = get_io_u(td);