Fix issue with termination before io_size has been reached
authorJens Axboe <axboe@fb.com>
Thu, 14 Jan 2016 21:44:23 +0000 (14:44 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 14 Jan 2016 21:44:23 +0000 (14:44 -0700)
If the size of the device isn't a multiple of the block size,
then we can exit prematurely for cases where an io_limit has
been set higher than the device size. This is because the file(s)
get marked completely done if bs is a multiple of the device size,
but doesn't for the opposite case.

We should not factor this in for deciding to keep running or not.

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

index bd94078ad5104a52a009694176ce7f2646d75bab..20784096a0d7b9b8e417d0235311b4ab983bfd29 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1293,7 +1293,7 @@ static bool keep_running(struct thread_data *td)
                if (diff < td_max_bs(td))
                        return false;
 
-               if (fio_files_done(td))
+               if (fio_files_done(td) && !td->o.io_limit)
                        return false;
 
                return true;