X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=thread_options.h;h=9b9079659801a9e9d94684b1c6abcdfbe49ff0c0;hp=c0fd7e26fed0bfb92cf6ee67b50a4de0293ae0f3;hb=f681d0bac9c42e5d6bcb3601d2f3cfaa1c2cefb4;hpb=e476994eed3bee246ca166ea6ad6018911408e9b diff --git a/thread_options.h b/thread_options.h index c0fd7e26..9b907965 100644 --- a/thread_options.h +++ b/thread_options.h @@ -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, }; @@ -43,6 +52,7 @@ struct thread_options { char *filename; char *opendir; char *ioengine; + char *mmapfile; enum td_ddir td_ddir; unsigned int rw_seq; unsigned int kb_base; @@ -60,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; @@ -77,6 +91,7 @@ struct thread_options { unsigned int create_serialize; unsigned int create_fsync; unsigned int create_on_open; + unsigned int create_only; unsigned int end_fsync; unsigned int pre_read; unsigned int sync_io; @@ -98,9 +113,6 @@ struct thread_options { unsigned int override_sync; unsigned int rand_repeatable; unsigned int use_os_rand; - unsigned int write_lat_log; - unsigned int write_bw_log; - unsigned int write_iops_log; unsigned int log_avg_msec; unsigned int norandommap; unsigned int softrandommap; @@ -125,6 +137,7 @@ struct thread_options { unsigned long long zone_range; unsigned long long zone_size; unsigned long long zone_skip; + unsigned long long lockmem; enum fio_memtype mem_type; unsigned int mem_align; @@ -139,6 +152,8 @@ struct thread_options { unsigned int rwmixcycle; unsigned int rwmix[2]; unsigned int nice; + unsigned int ioprio; + unsigned int ioprio_class; unsigned int file_service_type; unsigned int group_reporting; unsigned int fadvise_hint; @@ -179,20 +194,14 @@ 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; - /* - * CPU "io" cycle burner - */ - unsigned int cpuload; - unsigned int cpucycle; - /* * I/O Error handling */ @@ -218,6 +227,8 @@ struct thread_options { int flow_watermark; unsigned int flow_sleep; + unsigned long long offset_increment; + unsigned int sync_file_range; }; @@ -230,6 +241,7 @@ struct thread_options_pack { uint8_t filename[FIO_TOP_STR_MAX]; uint8_t opendir[FIO_TOP_STR_MAX]; uint8_t ioengine[FIO_TOP_STR_MAX]; + uint8_t mmapfile[FIO_TOP_STR_MAX]; uint32_t td_ddir; uint32_t rw_seq; uint32_t kb_base; @@ -247,12 +259,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; @@ -264,6 +280,7 @@ struct thread_options_pack { uint32_t create_serialize; uint32_t create_fsync; uint32_t create_on_open; + uint32_t create_only; uint32_t end_fsync; uint32_t pre_read; uint32_t sync_io; @@ -285,9 +302,6 @@ struct thread_options_pack { uint32_t override_sync; uint32_t rand_repeatable; uint32_t use_os_rand; - uint32_t write_lat_log; - uint32_t write_bw_log; - uint32_t write_iops_log; uint32_t log_avg_msec; uint32_t norandommap; uint32_t softrandommap; @@ -312,6 +326,7 @@ struct thread_options_pack { uint64_t zone_range; uint64_t zone_size; uint64_t zone_skip; + uint64_t lockmem; uint32_t mem_type; uint32_t mem_align; @@ -326,6 +341,8 @@ struct thread_options_pack { uint32_t rwmixcycle; uint32_t rwmix[2]; uint32_t nice; + uint32_t ioprio; + uint32_t ioprio_class; uint32_t file_service_type; uint32_t group_reporting; uint32_t fadvise_hint; @@ -366,20 +383,14 @@ 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]; - /* - * CPU "io" cycle burner - */ - uint32_t cpuload; - uint32_t cpucycle; - /* * I/O Error handling */ @@ -405,11 +416,14 @@ struct thread_options_pack { int32_t flow_watermark; uint32_t flow_sleep; + uint64_t offset_increment; + uint32_t sync_file_range; } __attribute__((packed)); extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top); extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *); extern int fio_test_cconv(struct thread_options *); +extern void options_default_fill(struct thread_options *o); #endif