X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=66099b58d3bd4ba4d4f2b26390e2392e4966e838;hp=ed437be2697d461295120f666257d20d8177d5ec;hb=ad705bcb7e79a7cdb9891db17b4c40b13b6c30c3;hpb=997843cbd55f34f7f48f2ebc108500d97e37474c diff --git a/options.c b/options.c index ed437be2..66099b58 100644 --- a/options.c +++ b/options.c @@ -986,20 +986,6 @@ static int str_verify_pattern_cb(void *data, const char *input) return 0; } -static int str_lockfile_cb(void *data, const char *str) -{ - struct thread_data *td = data; - char *nr = get_opt_postfix(str); - - td->o.lockfile_batch = 1; - if (nr) { - td->o.lockfile_batch = atoi(nr); - free(nr); - } - - return 0; -} - static int str_write_bw_log_cb(void *data, const char *str) { struct thread_data *td = data; @@ -1114,6 +1100,25 @@ static int kb_base_verify(struct fio_option *o, void *data) return 0; } +static int unit_base_verify(struct fio_option *o, void *data) +{ + struct thread_data *td = data; + + /* 0 = default, pick based on engine + * 1 = use bits + * 8 = use bytes + */ + if (td->o.unit_base != 0 && + td->o.unit_base != 1 && + td->o.unit_base != 8) { + log_err("fio: unit_base set to nonsensical value: %u\n", + td->o.unit_base); + return 1; + } + + return 0; +} + /* * Map of job/command line options */ @@ -1145,6 +1150,14 @@ static struct fio_option options[FIO_MAX_OPTS] = { .prio = -1, /* must come after "directory" */ .help = "File(s) to use for the workload", }, + { + .name = "filename_format", + .type = FIO_OPT_STR_STORE, + .off1 = td_var_offset(filename_format), + .prio = -1, /* must come after "directory" */ + .help = "Override default $jobname.$jobnum.$filenum naming", + .def = "$jobname.$jobnum.$filenum", + }, { .name = "kb_base", .type = FIO_OPT_INT, @@ -1154,10 +1167,18 @@ static struct fio_option options[FIO_MAX_OPTS] = { .def = "1024", .help = "How many bytes per KB for reporting (1000 or 1024)", }, + { + .name = "unit_base", + .type = FIO_OPT_INT, + .off1 = td_var_offset(unit_base), + .verify = unit_base_verify, + .prio = 1, + .def = "0", + .help = "Bit multiple of result summary data (8 for byte, 1 for bit)", + }, { .name = "lockfile", .type = FIO_OPT_STR, - .cb = str_lockfile_cb, .off1 = td_var_offset(file_lock_mode), .help = "Lock file when doing IO to it", .parent = "filename", @@ -1282,7 +1303,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Solaris native asynchronous IO", }, #endif -#ifdef FIO_HAVE_WINDOWSAIO +#ifdef CONFIG_WINDOWSAIO { .ival = "windowsaio", .help = "Windows native asynchronous IO" }, @@ -1965,6 +1986,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "experimental_verify", .off1 = td_var_offset(experimental_verify), .type = FIO_OPT_BOOL, + .help = "Enable experimental verification", }, #ifdef FIO_HAVE_TRIM { @@ -2433,8 +2455,9 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "percentile_list", .type = FIO_OPT_FLOAT_LIST, .off1 = td_var_offset(percentile_list), - .off2 = td_var_offset(overwrite_plist), + .off2 = td_var_offset(percentile_precision), .help = "Specify a custom list of percentiles to report", + .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99", .maxlen = FIO_IO_U_LIST_MAX_LEN, .minfp = 0.0, .maxfp = 100.0, @@ -2495,6 +2518,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Set up dedicated gettimeofday() thread on this CPU", .verify = gtod_cpu_verify, }, + { + .name = "unified_rw_reporting", + .type = FIO_OPT_BOOL, + .off1 = td_var_offset(unified_rw_rep), + .help = "Unify reporting across data direction", + .def = "0", + }, { .name = "continue_on_error", .type = FIO_OPT_STR,