From 543e2e9d2ebdd26449a3f07934b87c8e1ff35033 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 14 Jan 2016 14:44:23 -0700 Subject: [PATCH] Fix issue with termination before io_size has been reached 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 --- backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.c b/backend.c index bd94078a..20784096 100644 --- 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; -- 2.25.1