Track last file offset
[fio.git] / file.h
diff --git a/file.h b/file.h
index 6aa5b502c99246d2293e1598616b382349aa5aa2..2abe3ba4db9c3a3b04312aa6c9f6d4514547e4c0 100644 (file)
--- a/file.h
+++ b/file.h
@@ -74,6 +74,11 @@ struct fio_file {
 
        unsigned long long last_pos;
 
+       /*
+        * For use by the io engine
+        */
+       unsigned long long file_pos;
+
        /*
         * if io is protected by a semaphore, this is set
         */
@@ -133,6 +138,7 @@ extern int __must_check pre_read_files(struct thread_data *);
 extern int add_file(struct thread_data *, const char *);
 extern void get_file(struct fio_file *);
 extern int __must_check put_file(struct thread_data *, struct fio_file *);
+extern void put_file_log(struct thread_data *, struct fio_file *);
 extern void lock_file(struct thread_data *, struct fio_file *, enum fio_ddir);
 extern void unlock_file(struct thread_data *, struct fio_file *);
 extern void unlock_file_all(struct thread_data *, struct fio_file *);
@@ -146,6 +152,7 @@ static inline void fio_file_reset(struct fio_file *f)
 {
        f->last_free_lookup = 0;
        f->last_pos = f->file_offset;
+       f->file_pos = -1ULL;
        if (f->file_map)
                memset(f->file_map, 0, f->num_maps * sizeof(int));
 }