Fix re-run issue when job size is set to "unknown"
authorJens Axboe <axboe@kernel.dk>
Tue, 19 Mar 2013 13:49:35 +0000 (07:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Mar 2013 13:49:35 +0000 (07:49 -0600)
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 <axboe@kernel.dk>
backend.c

index e482fb846c8c4ebc2cee7c204b7e8b7dd23e6a0b..3567990b7e7e813ae1c1c0700cd8a8497d367ccf 100644 (file)
--- 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;
 
                /*