io_u: produce bad offsets for some time_based jobs
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 806ceb77761f549a0fc82e5da557b8c83d43ecaa..50197a4bfa70c83f99981c0f7719172a9243d178 100644 (file)
--- 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);
        }