X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=8a8f24cb1ea29c246db248357c3a216f555bb7be;hb=cf3a0518329fc341427fb9d81de5d7cb7cdd372c;hp=c39a6b4036f2f31bfbd0a6956fb7e61b01d042c6;hpb=95820b6e6c92025df8d89c0bf39b174e53137c41;p=fio.git diff --git a/options.c b/options.c index c39a6b40..8a8f24cb 100644 --- a/options.c +++ b/options.c @@ -868,20 +868,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_gtod_reduce_cb(void *data, int *il) { struct thread_data *td = data; @@ -963,6 +949,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; +} + /* * Option grouping */ @@ -1161,11 +1166,20 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_FILE, .group = FIO_OPT_G_FILENAME, }, + { + .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", + .category = FIO_OPT_C_FILE, + .group = FIO_OPT_G_FILENAME, + }, { .name = "lockfile", .lname = "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", @@ -2851,8 +2865,9 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .lname = "Completion latency 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, @@ -2947,6 +2962,8 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .off1 = td_var_offset(unified_rw_rep), .help = "Unify reporting across data direction", .def = "0", + .category = FIO_OPT_C_GENERAL, + .group = FIO_OPT_G_INVALID, }, { .name = "continue_on_error", @@ -3081,6 +3098,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_GENERAL, .group = FIO_OPT_G_INVALID, }, + { + .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)", + .category = FIO_OPT_C_GENERAL, + .group = FIO_OPT_G_INVALID, + }, { .name = "hugepage-size", .lname = "Hugepage size",