From 46ec82705a9775bbe4abd2dec0b531810887b9f2 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Wed, 23 Mar 2022 18:22:37 -0400 Subject: [PATCH] io_u: produce bad offsets for some time_based jobs Allow get_next_seq_offset to produce bad offsets for time_based jobs when fio is accessing more than one file. Otherwise fio will not skip to the next file once the current one is done. Fixes: https://github.com/axboe/fio/issues/1372 Signed-off-by: Vincent Fu --- io_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index 806ceb77..50197a4b 100644 --- a/io_u.c +++ b/io_u.c @@ -355,7 +355,7 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f, * and invalidate the cache, if we need to. */ if (f->last_pos[ddir] >= f->io_size + get_start_offset(td, f) && - o->time_based) { + o->time_based && o->nr_files == 1) { f->last_pos[ddir] = f->file_offset; loop_cache_invalidate(td, f); } -- 2.25.1