8 static const struct opt_group fio_opt_groups[] = {
11 .mask = FIO_OPT_C_GENERAL,
19 .mask = FIO_OPT_C_FILE,
23 .mask = FIO_OPT_C_STAT,
27 .mask = FIO_OPT_C_LOG,
31 .mask = FIO_OPT_C_PROFILE,
38 static const struct opt_group fio_opt_cat_groups[] = {
40 .name = "Latency profiling",
41 .mask = FIO_OPT_G_LATPROF,
45 .mask = FIO_OPT_G_RATE,
49 .mask = FIO_OPT_G_ZONE,
52 .name = "Read/write mix",
53 .mask = FIO_OPT_G_RWMIX,
57 .mask = FIO_OPT_G_VERIFY,
61 .mask = FIO_OPT_G_TRIM,
64 .name = "I/O Logging",
65 .mask = FIO_OPT_G_IOLOG,
69 .mask = FIO_OPT_G_IO_DEPTH,
73 .mask = FIO_OPT_G_IO_FLOW,
76 .name = "Description",
77 .mask = FIO_OPT_G_DESC,
81 .mask = FIO_OPT_G_FILENAME,
84 .name = "General I/O",
85 .mask = FIO_OPT_G_IO_BASIC,
89 .mask = FIO_OPT_G_CGROUP,
93 .mask = FIO_OPT_G_RUNTIME,
97 .mask = FIO_OPT_G_PROCESS,
100 .name = "Job credentials / priority",
101 .mask = FIO_OPT_G_CRED,
104 .name = "Clock settings",
105 .mask = FIO_OPT_G_CLOCK,
109 .mask = FIO_OPT_G_IO_TYPE,
112 .name = "I/O Thinktime",
113 .mask = FIO_OPT_G_THINKTIME,
116 .name = "Randomizations",
117 .mask = FIO_OPT_G_RANDOM,
120 .name = "I/O buffers",
121 .mask = FIO_OPT_G_IO_BUF,
124 .name = "Tiobench profile",
125 .mask = FIO_OPT_G_TIOBENCH,
129 .mask = FIO_OPT_G_MTD,
137 static const struct opt_group *group_from_mask(const struct opt_group *ogs,
143 if (*mask == inv_mask || !*mask)
146 for (i = 0; ogs[i].name; i++) {
147 const struct opt_group *og = &ogs[i];
149 if (*mask & og->mask) {
150 *mask &= ~(og->mask);
158 const struct opt_group *opt_group_from_mask(uint64_t *mask)
160 return group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
163 const struct opt_group *opt_group_cat_from_mask(uint64_t *mask)
165 return group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);