Track last file offset
[fio.git] / file.h
diff --git a/file.h b/file.h
index dc22d4e058a177f373131acb370c838d4441b88f..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
         */
@@ -147,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));
 }