From 108600560ae2368369e7b75255539b3286341929 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 19 Mar 2012 20:56:53 +0100 Subject: [PATCH] options: more option grouping Signed-off-by: Jens Axboe --- options.c | 32 ++++++++++++++++++++++---------- options.h | 6 ++++++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/options.c b/options.c index b72d690f..1b0117ef 100644 --- a/options.c +++ b/options.c @@ -950,6 +950,18 @@ static struct opt_group fio_opt_cat_groups[] = { .name = "Runtime", .mask = FIO_OPT_G_RUNTIME, }, + { + .name = "Process", + .mask = FIO_OPT_G_PROCESS, + }, + { + .name = "Job credentials / priority", + .mask = FIO_OPT_G_CRED, + }, + { + .name = "Clock settings", + .mask = FIO_OPT_G_CLOCK, + }, { .name = NULL, } @@ -1677,7 +1689,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .off1 = td_var_offset(clocksource), .help = "What type of timing source to use", .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CLOCK, .posval = { { .ival = "gettimeofday", .oval = CS_GTOD, @@ -2155,7 +2167,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .def = "0", .interval = 1, .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, #ifdef FIO_HAVE_IOPRIO { @@ -2168,7 +2180,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .maxval = 7, .interval = 1, .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, { .name = "prioclass", @@ -2180,7 +2192,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .maxval = 3, .interval = 1, .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, #endif { @@ -2392,7 +2404,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .cb = str_cpumask_cb, .help = "CPU affinity mask", .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, { .name = "cpus_allowed", @@ -2401,7 +2413,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .cb = str_cpus_allowed_cb, .help = "Set CPUs allowed", .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, #endif { @@ -2529,7 +2541,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .off1 = td_var_offset(group_reporting), .help = "Do reporting on a per-group basis", .def = "1", - .category = FIO_OPT_C_GENERAL, + .category = FIO_OPT_C_STAT, .group = FIO_OPT_G_INVALID, }, { @@ -2686,7 +2698,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "Set up dedicated gettimeofday() thread on this CPU", .verify = gtod_cpu_verify, .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CLOCK, }, { .name = "continue_on_error", @@ -2780,7 +2792,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .off1 = td_var_offset(uid), .help = "Run job with this user ID", .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, { .name = "gid", @@ -2789,7 +2801,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .off1 = td_var_offset(gid), .help = "Run job with this group ID", .category = FIO_OPT_C_GENERAL, - .group = FIO_OPT_G_INVALID, + .group = FIO_OPT_G_CRED, }, { .name = "kb_base", diff --git a/options.h b/options.h index cee218c6..a13afd14 100644 --- a/options.h +++ b/options.h @@ -77,6 +77,9 @@ enum opt_category_group { __FIO_OPT_G_IO_BASIC, __FIO_OPT_G_CGROUP, __FIO_OPT_G_RUNTIME, + __FIO_OPT_G_PROCESS, + __FIO_OPT_G_CRED, + __FIO_OPT_G_CLOCK, __FIO_OPT_G_NR, FIO_OPT_G_RATE = (1U << __FIO_OPT_G_RATE), @@ -92,6 +95,9 @@ enum opt_category_group { FIO_OPT_G_IO_BASIC = (1U << __FIO_OPT_G_IO_BASIC), FIO_OPT_G_CGROUP = (1U << __FIO_OPT_G_CGROUP), FIO_OPT_G_RUNTIME = (1U << __FIO_OPT_G_RUNTIME), + FIO_OPT_G_PROCESS = (1U << __FIO_OPT_G_PROCESS), + FIO_OPT_G_CRED = (1U << __FIO_OPT_G_CRED), + FIO_OPT_G_CLOCK = (1U << __FIO_OPT_G_CLOCK), FIO_OPT_G_INVALID = (1U << __FIO_OPT_G_NR), }; -- 2.25.1