Fix read/write mix and different levels of randomness
[fio.git] / file.h
diff --git a/file.h b/file.h
index c929d1dae482fe01c43b51980e0b5c72914ac57c..bb303103048cd847e3918efc18c98efbda1950fb 100644 (file)
--- a/file.h
+++ b/file.h
@@ -88,8 +88,11 @@ struct fio_file {
        uint64_t file_offset;
        uint64_t io_size;
 
-       uint64_t last_pos;
-       uint64_t last_start;
+       /*
+        * Track last end and last start of IO for a given data direction
+        */
+       uint64_t last_pos[DDIR_RWDIR_CNT];
+       uint64_t last_start[DDIR_RWDIR_CNT];
 
        uint64_t first_write;
        uint64_t last_write;
@@ -159,7 +162,7 @@ FILE_FLAG_FNS(partial_mmap);
 struct thread_data;
 extern void close_files(struct thread_data *);
 extern void close_and_free_files(struct thread_data *);
-extern uint64_t get_start_offset(struct thread_data *);
+extern uint64_t get_start_offset(struct thread_data *, struct fio_file *);
 extern int __must_check setup_files(struct thread_data *);
 extern int __must_check file_invalidate_cache(struct thread_data *, struct fio_file *);
 extern int __must_check generic_open_file(struct thread_data *, struct fio_file *);