X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=c838ee00b2eb01c15d4f70bf99d9a0dd999dc140;hp=fcf427037f77f0ab456efc055b725a485fbe2512;hb=71a082583c93a7767d1bb331138990282dfdc01d;hpb=8ea39c32d29428b17bfe9c806fc33f0c8adfe118 diff --git a/options.c b/options.c index fcf42703..c838ee00 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; @@ -1161,11 +1147,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", @@ -3084,6 +3079,29 @@ 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), + .prio = 1, + .posval = { + { .ival = "0", + .oval = 0, + .help = "Auto-detect", + }, + { .ival = "8", + .oval = 8, + .help = "Normal (byte based)", + }, + { .ival = "1", + .oval = 1, + .help = "Bit based", + }, + }, + .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",