Add the file sharing bits
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 6b8ffe29512bffe563a28263e7bbebb1bd50cd67..ffd3d7d00a1252cc60ca1280269977a7f1f2b36e 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -22,6 +22,7 @@
 #include "arch/arch.h"
 #include "os/os.h"
 #include "mutex.h"
+#include "sem.h"
 #include "log.h"
 #include "debug.h"
 
@@ -274,6 +275,7 @@ enum fio_file_flags {
        FIO_FILE_EXTEND         = 1 << 2,       /* needs extend */
        FIO_FILE_DONE           = 1 << 3,       /* io completed to this file */
        FIO_SIZE_KNOWN          = 1 << 4,       /* size has been set */
+       FIO_FILE_HASHED         = 1 << 5,       /* file is on hash */
 };
 
 /*
@@ -281,6 +283,7 @@ enum fio_file_flags {
  * this structure holds state information for a single file.
  */
 struct fio_file {
+       struct list_head hash_list;
        enum fio_filetype filetype;
 
        /*
@@ -307,6 +310,13 @@ struct fio_file {
 
        unsigned long long last_pos;
 
+       /*
+        * if io is protected by a semaphore, this is set
+        */
+       struct fio_sem *sem;
+       void *sem_owner;
+       unsigned int sem_batch;
+
        /*
         * block map for random io
         */
@@ -405,6 +415,8 @@ struct thread_options {
 
        unsigned int nr_files;
        unsigned int open_files;
+       unsigned int lockfile;
+       unsigned int lockfile_batch;
 
        unsigned int odirect;
        unsigned int invalidate_cache;