Branch and cache miss speedups
[fio.git] / ioengine.h
index 0756bc7e6c1335dc729bbe6c08b9f78630121d66..7e0707bc9c35667ab07fda03f08f62f49cc505cf 100644 (file)
@@ -15,7 +15,7 @@
 #include <guasi.h>
 #endif
 
-#define FIO_IOOPS_VERSION      16
+#define FIO_IOOPS_VERSION      17
 
 enum {
        IO_U_F_FREE             = 1 << 0,
@@ -71,6 +71,27 @@ struct io_u {
         */
        unsigned long buf_filled_len;
 
+       struct io_piece *ipo;
+
+       unsigned int resid;
+       unsigned int error;
+
+       /*
+        * io engine private data
+        */
+       union {
+               unsigned int index;
+               unsigned int seen;
+               void *engine_data;
+       };
+
+       struct flist_head verify_list;
+
+       /*
+        * Callback for io completion
+        */
+       int (*end_io)(struct thread_data *, struct io_u *);
+
        union {
 #ifdef CONFIG_LIBAIO
                struct iocb iocb;
@@ -95,25 +116,6 @@ struct io_u {
 #endif
                void *mmap_data;
        };
-
-       unsigned int resid;
-       unsigned int error;
-
-       /*
-        * io engine private data
-        */
-       union {
-               unsigned int index;
-               unsigned int seen;
-               void *engine_data;
-       };
-
-       struct flist_head verify_list;
-
-       /*
-        * Callback for io completion
-        */
-       int (*end_io)(struct thread_data *, struct io_u *);
 };
 
 /*
@@ -165,6 +167,11 @@ enum fio_ioengine_flags {
        FIO_BIT_BASED   = 1 << 10,      /* engine uses a bit base (e.g. uses Kbit as opposed to KB) */
 };
 
+/*
+ * External engine defined symbol to fill in the engine ops structure
+ */
+typedef void (*get_ioengine_t)(struct ioengine_ops **);
+
 /*
  * io engine entry points
  */