Make experimental_verify=1 handle all cases properly
[fio.git] / ioengine.h
index 6809501ffa795fa46e59419d91345bfc3904a0a6..d5a0dc9c88d16c7b53e6d221b6cb9484e6a83e75 100644 (file)
@@ -8,7 +8,7 @@
 #include <guasi.h>
 #endif
 
-#define FIO_IOOPS_VERSION      14
+#define FIO_IOOPS_VERSION      15
 
 enum {
        IO_U_F_FREE             = 1 << 0,
@@ -56,6 +56,12 @@ struct io_u {
        unsigned int flags;
        enum fio_ddir ddir;
 
+       /*
+        * For replay workloads, we may want to account as a different
+        * IO type than what is being submitted.
+        */
+       enum fio_ddir acct_ddir;
+
        /*
         * Allocated/set buffer and length
         */
@@ -210,4 +216,12 @@ static inline void dprint_io_u(struct io_u *io_u, const char *p)
 #define dprint_io_u(io_u, p)
 #endif
 
+static inline enum fio_ddir acct_ddir(struct io_u *io_u)
+{
+       if (io_u->acct_ddir != -1)
+               return io_u->acct_ddir;
+
+       return io_u->ddir;
+}
+
 #endif