Change IO engine queuing
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 5fad44648e6a95d071904bd4e1dabb2d3bf43076..b087f97285f0a7b7682538cc1d76c34846a3cc1e 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -129,6 +129,14 @@ struct io_u {
        struct list_head list;
 };
 
+/*
+ * io_ops->queue() return values
+ */
+enum {
+       FIO_Q_COMPLETED = 0,            /* completed sync */
+       FIO_Q_QUEUED    = 1,            /* queued, will complete async */
+};
+
 #define FIO_HDR_MAGIC  0xf00baaef
 
 enum {
@@ -196,7 +204,7 @@ struct fio_file {
         */
        union {
                unsigned long file_data;
-               long fd;
+               int fd;
        };
        char *file_name;
        void *mmap;
@@ -220,6 +228,7 @@ struct fio_file {
  * How many depth levels to log
  */
 #define FIO_IO_U_MAP_NR        8
+#define FIO_IO_U_LAT_NR 12
 
 /*
  * This describes a single thread/process executing a fio job.
@@ -273,6 +282,7 @@ struct thread_data {
        unsigned int hugepage_size;
        unsigned int rw_min_bs;
        unsigned int thinktime;
+       unsigned int thinktime_spin;
        unsigned int thinktime_blocks;
        unsigned int fsync_blocks;
        unsigned int start_delay;
@@ -320,6 +330,7 @@ struct thread_data {
         */
        unsigned int cur_depth;
        unsigned int io_u_map[FIO_IO_U_MAP_NR];
+       unsigned int io_u_lat[FIO_IO_U_LAT_NR];
        unsigned long total_io_u;
        struct list_head io_u_freelist;
        struct list_head io_u_busylist;
@@ -605,6 +616,7 @@ extern struct io_u *get_io_u(struct thread_data *, struct fio_file *);
 extern void put_io_u(struct thread_data *, struct io_u *);
 extern void ios_completed(struct thread_data *, struct io_completion_data *);
 extern void io_completed(struct thread_data *, struct io_u *, struct io_completion_data *);
+extern void init_icd(struct io_completion_data *);
 
 /*
  * io engine entry points
@@ -663,9 +675,10 @@ struct ioengine_ops {
        void (*cleanup)(struct thread_data *);
        void *data;
        void *dlhandle;
+       unsigned long priv;
 };
 
-#define FIO_IOOPS_VERSION      3
+#define FIO_IOOPS_VERSION      4
 
 extern struct ioengine_ops *load_ioengine(struct thread_data *, const char *);
 extern int register_ioengine(struct ioengine_ops *);