Fix bug with time_based run
We need to clear the FIO_FILE_DONE flag and the number of
files done, to avoid do_io() exiting quickly for a re-run.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 6483e64..9e93159 100644
--- a/fio.c
+++ b/fio.c
@@ -736,11 +736,14 @@
td->last_was_sync = 0;
+ td->nr_done_files = 0;
+
for_each_file(td, f, i)
td_io_close_file(td, f);
ret = 0;
for_each_file(td, f, i) {
+ f->flags &= ~FIO_FILE_DONE;
ret = td_io_open_file(td, f);
if (ret)
break;