From: Vincent Fu Date: Wed, 23 Mar 2022 22:22:37 +0000 (-0400) Subject: io_u: produce bad offsets for some time_based jobs X-Git-Tag: fio-3.30~5^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=46ec82705a9775bbe4abd2dec0b531810887b9f2;p=fio.git 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 --- 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); }