Makefile updates
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index ca35ffcd5e7884c8fce02f9ad741b45bb8a67e10..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;
 
        /*
@@ -306,7 +309,13 @@ struct fio_file {
        unsigned long long io_size;
 
        unsigned long long last_pos;
-       unsigned long long last_completed_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
@@ -406,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;
@@ -809,6 +820,8 @@ extern int __must_check generic_close_file(struct thread_data *, struct fio_file
 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 lock_file(struct thread_data *, struct fio_file *);
+extern void unlock_file(struct fio_file *);
 extern int add_dir_files(struct thread_data *, const char *);
 extern int init_random_map(struct thread_data *);
 extern void dup_files(struct thread_data *, struct thread_data *);