[PATCH] Add support for read/write mixed io
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index d1e4e04cee289dcc08dad69cf10b881d506cf2e2..37dabae1ec0af62c7718332706b0a9041336ae94 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -115,6 +115,7 @@ struct thread_data {
        volatile int runstate;
        volatile int old_runstate;
        unsigned int ddir;
+       unsigned int iomix;
        unsigned int ioprio;
        unsigned int sequential;
        unsigned int bs;
@@ -146,6 +147,7 @@ struct thread_data {
        unsigned int use_thread;
        unsigned int iodepth;
        os_cpu_mask_t cpumask;
+       unsigned int jobnum;
 
        struct drand48_data bsrange_state;
        struct drand48_data verify_state;
@@ -275,6 +277,7 @@ enum {
 
 #define td_read(td)            ((td)->ddir == DDIR_READ)
 #define td_write(td)           ((td)->ddir == DDIR_WRITE)
+#define td_rw(td)              ((td)->iomix != 0)
 
 #define BLOCKS_PER_MAP         (8 * sizeof(long))
 #define TO_MAP_BLOCK(td, b)    ((b) - ((td)->file_offset / (td)->min_bs))
@@ -315,4 +318,8 @@ struct io_completion_data {
 
 #define DISK_UTIL_MSEC (250)
 
+#ifndef min
+#define min(a, b)      ((a) < (b) ? (a) : (b))
+#endif
+
 #endif