From: Jens Axboe Date: Tue, 19 Mar 2013 13:49:35 +0000 (-0600) Subject: Fix re-run issue when job size is set to "unknown" X-Git-Tag: fio-2.0.15~23 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ee98e23416e8543bf48b734802cd1e49ed894f9e Fix re-run issue when job size is set to "unknown" Assert that td->o.size is valid before comparing the IO amount we did to it. This prevents re-running a job because we think there's more work to do. But if we haven't set ->o.size to a valid value, then that must not determine whether to re-run the loop or not. Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index e482fb84..3567990b 100644 --- a/backend.c +++ b/backend.c @@ -1034,7 +1034,7 @@ static int keep_running(struct thread_data *td) return 1; } - if (ddir_rw_sum(td->io_bytes) < td->o.size) { + if (td->o.size != -1ULL && ddir_rw_sum(td->io_bytes) < td->o.size) { uint64_t diff; /*