Merge branch 'master' into gfio
[fio.git] / thread_options.h
index a78684cf985030f861da02a68f77de30d3f114fe..9975af17d4f24b078f78bfea23c81475c5ba5cf6 100644 (file)
@@ -20,11 +20,20 @@ enum fio_memtype {
 /*
  * What type of errors to continue on when continue_on_error is used
  */
+enum error_type_bit {
+       ERROR_TYPE_READ_BIT = 0,
+       ERROR_TYPE_WRITE_BIT = 1,
+       ERROR_TYPE_VERIFY_BIT = 2,
+       ERROR_TYPE_CNT = 3,
+};
+
+#define ERROR_STR_MAX  128
+
 enum error_type {
         ERROR_TYPE_NONE = 0,
-        ERROR_TYPE_READ = 1 << 0,
-        ERROR_TYPE_WRITE = 1 << 1,
-        ERROR_TYPE_VERIFY = 1 << 2,
+        ERROR_TYPE_READ = 1 << ERROR_TYPE_READ_BIT,
+        ERROR_TYPE_WRITE = 1 << ERROR_TYPE_WRITE_BIT,
+        ERROR_TYPE_VERIFY = 1 << ERROR_TYPE_VERIFY_BIT,
         ERROR_TYPE_ANY = 0xffff,
 };
 
@@ -61,12 +70,16 @@ struct thread_options {
        unsigned long long file_size_high;
        unsigned long long start_offset;
 
-       unsigned int bs[2];
-       unsigned int ba[2];
-       unsigned int min_bs[2];
-       unsigned int max_bs[2];
-       struct bssplit *bssplit[2];
-       unsigned int bssplit_nr[2];
+       unsigned int bs[DDIR_RWDIR_CNT];
+       unsigned int ba[DDIR_RWDIR_CNT];
+       unsigned int min_bs[DDIR_RWDIR_CNT];
+       unsigned int max_bs[DDIR_RWDIR_CNT];
+       struct bssplit *bssplit[DDIR_RWDIR_CNT];
+       unsigned int bssplit_nr[DDIR_RWDIR_CNT];
+
+       int *ignore_error[ERROR_TYPE_CNT];
+       unsigned int ignore_error_nr[ERROR_TYPE_CNT];
+       unsigned int error_dump;
 
        unsigned int nr_files;
        unsigned int open_files;
@@ -106,6 +119,10 @@ struct thread_options {
        unsigned int bs_unaligned;
        unsigned int fsync_on_close;
 
+       unsigned int random_distribution;
+       fio_fp64_t zipf_theta;
+       fio_fp64_t pareto_h;
+
        unsigned int hugepage_size;
        unsigned int rw_min_bs;
        unsigned int thinktime;
@@ -128,6 +145,8 @@ struct thread_options {
        enum fio_memtype mem_type;
        unsigned int mem_align;
 
+       unsigned max_latency;
+
        unsigned int stonewall;
        unsigned int new_group;
        unsigned int numjobs;
@@ -135,6 +154,14 @@ struct thread_options {
        unsigned int cpumask_set;
        os_cpu_mask_t verify_cpumask;
        unsigned int verify_cpumask_set;
+#ifdef FIO_HAVE_LIBNUMA
+       struct bitmask *numa_cpunodesmask;
+       unsigned int numa_cpumask_set;
+       unsigned short numa_mem_mode;
+       unsigned int numa_mem_prefer_node;
+       struct bitmask *numa_memnodesmask;
+       unsigned int numa_memmask_set;
+#endif
        unsigned int iolog;
        unsigned int rwmixcycle;
        unsigned int rwmix[2];
@@ -181,11 +208,11 @@ struct thread_options {
        char *exec_prerun;
        char *exec_postrun;
 
-       unsigned int rate[2];
-       unsigned int ratemin[2];
+       unsigned int rate[DDIR_RWDIR_CNT];
+       unsigned int ratemin[DDIR_RWDIR_CNT];
        unsigned int ratecycle;
-       unsigned int rate_iops[2];
-       unsigned int rate_iops_min[2];
+       unsigned int rate_iops[DDIR_RWDIR_CNT];
+       unsigned int rate_iops_min[DDIR_RWDIR_CNT];
 
        char *ioscheduler;
 
@@ -246,12 +273,16 @@ struct thread_options_pack {
        uint64_t file_size_high;
        uint64_t start_offset;
 
-       uint32_t bs[2];
-       uint32_t ba[2];
-       uint32_t min_bs[2];
-       uint32_t max_bs[2];
-       struct bssplit bssplit[2][BSSPLIT_MAX];
-       uint32_t bssplit_nr[2];
+       uint32_t bs[DDIR_RWDIR_CNT];
+       uint32_t ba[DDIR_RWDIR_CNT];
+       uint32_t min_bs[DDIR_RWDIR_CNT];
+       uint32_t max_bs[DDIR_RWDIR_CNT];
+       struct bssplit bssplit[DDIR_RWDIR_CNT][BSSPLIT_MAX];
+       uint32_t bssplit_nr[DDIR_RWDIR_CNT];
+
+       uint32_t ignore_error[ERROR_TYPE_CNT][ERROR_STR_MAX];
+       uint32_t ignore_error_nr[ERROR_TYPE_CNT];
+       uint32_t error_dump;
 
        uint32_t nr_files;
        uint32_t open_files;
@@ -291,6 +322,10 @@ struct thread_options_pack {
        uint32_t bs_unaligned;
        uint32_t fsync_on_close;
 
+       uint32_t random_distribution;
+       fio_fp64_t zipf_theta;
+       fio_fp64_t pareto_h;
+
        uint32_t hugepage_size;
        uint32_t rw_min_bs;
        uint32_t thinktime;
@@ -313,6 +348,8 @@ struct thread_options_pack {
        uint32_t mem_type;
        uint32_t mem_align;
 
+       uint32_t max_latency;
+
        uint32_t stonewall;
        uint32_t new_group;
        uint32_t numjobs;
@@ -366,11 +403,11 @@ struct thread_options_pack {
        uint8_t exec_prerun[FIO_TOP_STR_MAX];
        uint8_t exec_postrun[FIO_TOP_STR_MAX];
 
-       uint32_t rate[2];
-       uint32_t ratemin[2];
+       uint32_t rate[DDIR_RWDIR_CNT];
+       uint32_t ratemin[DDIR_RWDIR_CNT];
        uint32_t ratecycle;
-       uint32_t rate_iops[2];
-       uint32_t rate_iops_min[2];
+       uint32_t rate_iops[DDIR_RWDIR_CNT];
+       uint32_t rate_iops_min[DDIR_RWDIR_CNT];
 
        uint8_t ioscheduler[FIO_TOP_STR_MAX];