Fix bad interaction with file open/close and queuing
[fio.git] / ioengines.c
index d3ee4b9..9e1c556 100644 (file)
@@ -327,8 +327,7 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f)
                }
        }
 
-       f->last_free_lookup = 0;
-       f->last_pos = f->file_offset;
+       fio_file_reset(f);
        f->flags |= FIO_FILE_OPEN;
        f->flags &= ~FIO_FILE_CLOSING;