.type = FIO_OPT_INT,
.off1 = td_var_offset(iodepth_batch),
.help = "Number of IO to submit in one go",
+ .parent = "iodepth",
},
{
.name = "iodepth_low",
.type = FIO_OPT_INT,
.off1 = td_var_offset(iodepth_low),
.help = "Low water mark for queuing depth",
+ .parent = "iodepth",
},
{
.name = "size",
.off1 = td_var_offset(verify_interval),
.minval = 2 * sizeof(struct verify_header),
.help = "Store verify buffer header every N bytes",
+ .parent = "verify",
},
{
.name = "verify_offset",
.help = "Offset verify header location by N bytes",
.def = "0",
.cb = str_verify_offset_cb,
+ .parent = "verify",
},
{
.name = "verify_pattern",
.type = FIO_OPT_INT,
.cb = str_verify_pattern_cb,
.help = "Fill pattern for IO buffers",
+ .parent = "verify",
},
{
.name = "write_iolog",
.help = "Lock down this amount of memory",
.def = "0",
},
- {
- .name = "rwmixcycle",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(rwmixcycle),
- .help = "Cycle period for mixed read/write workloads (msec)",
- .def = "500",
- },
{
.name = "rwmixread",
.type = FIO_OPT_INT,
.help = "Percentage of mixed workload that is writes",
.def = "50",
},
+ {
+ .name = "rwmixcycle",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(rwmixcycle),
+ .help = "Cycle period for mixed read/write workloads (msec)",
+ .def = "500",
+ .parent = "rwmixread",
+ },
{
.name = "nice",
.type = FIO_OPT_INT,
.off1 = td_var_offset(thinktime_spin),
.help = "Start think time by spinning this amount (usec)",
.def = "0",
+ .parent = "thinktime",
},
{
.name = "thinktime_blocks",
.off1 = td_var_offset(thinktime_blocks),
.help = "IO buffer period between 'thinktime'",
.def = "1",
+ .parent = "thinktime",
},
{
.name = "rate",
.type = FIO_OPT_INT,
.off1 = td_var_offset(ratemin),
.help = "Job must meet this rate or it will be shutdown",
+ .parent = "rate",
},
{
.name = "rate_iops",
.type = FIO_OPT_INT,
.off1 = td_var_offset(rate_iops_min),
.help = "Job must meet this rate or it will be shutdown",
+ .parent = "rate_iops",
},
{
.name = "ratecycle",
.off1 = td_var_offset(ratecycle),
.help = "Window average for rate limits (msec)",
.def = "1000",
+ .parent = "rate",
},
{
.name = "invalidate",
show_option_values(o);
}
+static struct fio_option *find_child(struct fio_option *options,
+ struct fio_option *o)
+{
+ struct fio_option *__o;
+
+ for (__o = &options[0]; __o->name; __o++)
+ if (__o->parent && !strcmp(__o->parent, o->name))
+ return __o;
+
+ return NULL;
+}
+
+static void print_option(struct fio_option *options, struct fio_option *o,
+ int level)
+{
+ char name[256], *p;
+ int i;
+
+ if (!o)
+ return;
+
+ p = name;
+ for (i = 0; i < level; i++)
+ p += sprintf(p, "%s", " ");
+
+ sprintf(p, "%s", o->name);
+
+ printf("%-24s: %s\n", name, o->help);
+ print_option(options, find_child(options, o), level + 1);
+}
+
int show_cmd_help(struct fio_option *options, const char *name)
{
struct fio_option *o, *closest;
if (show_all || match) {
found = 1;
if (match)
- printf("%20s: %s\n", o->name, o->help);
+ printf("%24s: %s\n", o->name, o->help);
if (show_all) {
- printf("%-20s: %s\n", o->name, o->help);
+ if (!o->parent)
+ print_option(options, o, 0);
continue;
}
}