4 #define FIO_MAX_OPTS 512
10 #define td_var_offset(var) ((size_t) &((struct thread_options *)0)->var)
12 int add_option(struct fio_option *);
13 void invalidate_profile_options(const char *);
14 extern char *exec_profile;
16 void add_opt_posval(const char *, const char *, const char *);
17 void del_opt_posval(const char *, const char *);
19 void fio_options_free(struct thread_data *);
20 char *get_name_idx(char *, int);
21 int set_name_idx(char *, char *, int);
23 extern struct fio_option fio_options[FIO_MAX_OPTS];
25 extern int __fio_option_is_set(struct thread_options *, unsigned int off);
27 #define fio_option_is_set(__td, name) \
29 int __r = __fio_option_is_set((__td), td_var_offset(name)); \
31 log_err("fio: wanted %s\n", __fio_stringify(name)); \
37 extern void fio_option_mark_set(struct thread_options *, struct fio_option *);
39 static inline int o_match(struct fio_option *o, const char *opt)
41 if (!strcmp(o->name, opt))
43 else if (o->alias && !strcmp(o->alias, opt))
49 static inline struct fio_option *find_option(struct fio_option *options,
54 for (o = &options[0]; o->name; o++)
67 __FIO_OPT_C_GENERAL = 0,
76 FIO_OPT_C_GENERAL = (1U << __FIO_OPT_C_GENERAL),
77 FIO_OPT_C_IO = (1U << __FIO_OPT_C_IO),
78 FIO_OPT_C_FILE = (1U << __FIO_OPT_C_FILE),
79 FIO_OPT_C_STAT = (1U << __FIO_OPT_C_STAT),
80 FIO_OPT_C_LOG = (1U << __FIO_OPT_C_LOG),
81 FIO_OPT_C_PROFILE = (1U << __FIO_OPT_C_PROFILE),
82 FIO_OPT_C_ENGINE = (1U << __FIO_OPT_C_ENGINE),
83 FIO_OPT_C_INVALID = (1U << __FIO_OPT_C_NR),
86 enum opt_category_group {
104 __FIO_OPT_G_THINKTIME,
107 __FIO_OPT_G_TIOBENCH,
109 __FIO_OPT_G_E4DEFRAG,
118 FIO_OPT_G_RATE = (1U << __FIO_OPT_G_RATE),
119 FIO_OPT_G_ZONE = (1U << __FIO_OPT_G_ZONE),
120 FIO_OPT_G_RWMIX = (1U << __FIO_OPT_G_RWMIX),
121 FIO_OPT_G_VERIFY = (1U << __FIO_OPT_G_VERIFY),
122 FIO_OPT_G_TRIM = (1U << __FIO_OPT_G_TRIM),
123 FIO_OPT_G_IOLOG = (1U << __FIO_OPT_G_IOLOG),
124 FIO_OPT_G_IO_DEPTH = (1U << __FIO_OPT_G_IO_DEPTH),
125 FIO_OPT_G_IO_FLOW = (1U << __FIO_OPT_G_IO_FLOW),
126 FIO_OPT_G_DESC = (1U << __FIO_OPT_G_DESC),
127 FIO_OPT_G_FILENAME = (1U << __FIO_OPT_G_FILENAME),
128 FIO_OPT_G_IO_BASIC = (1U << __FIO_OPT_G_IO_BASIC),
129 FIO_OPT_G_CGROUP = (1U << __FIO_OPT_G_CGROUP),
130 FIO_OPT_G_RUNTIME = (1U << __FIO_OPT_G_RUNTIME),
131 FIO_OPT_G_PROCESS = (1U << __FIO_OPT_G_PROCESS),
132 FIO_OPT_G_CRED = (1U << __FIO_OPT_G_CRED),
133 FIO_OPT_G_CLOCK = (1U << __FIO_OPT_G_CLOCK),
134 FIO_OPT_G_IO_TYPE = (1U << __FIO_OPT_G_IO_TYPE),
135 FIO_OPT_G_THINKTIME = (1U << __FIO_OPT_G_THINKTIME),
136 FIO_OPT_G_RANDOM = (1U << __FIO_OPT_G_RANDOM),
137 FIO_OPT_G_IO_BUF = (1U << __FIO_OPT_G_IO_BUF),
138 FIO_OPT_G_TIOBENCH = (1U << __FIO_OPT_G_TIOBENCH),
139 FIO_OPT_G_ERR = (1U << __FIO_OPT_G_ERR),
140 FIO_OPT_G_E4DEFRAG = (1U << __FIO_OPT_G_E4DEFRAG),
141 FIO_OPT_G_NETIO = (1U << __FIO_OPT_G_NETIO),
142 FIO_OPT_G_LIBAIO = (1U << __FIO_OPT_G_LIBAIO),
143 FIO_OPT_G_ACT = (1U << __FIO_OPT_G_ACT),
144 FIO_OPT_G_LATPROF = (1U << __FIO_OPT_G_LATPROF),
145 FIO_OPT_G_RBD = (1U << __FIO_OPT_G_RBD),
146 FIO_OPT_G_GFAPI = (1U << __FIO_OPT_G_GFAPI),
147 FIO_OPT_G_INVALID = (1U << __FIO_OPT_G_NR),
150 extern struct opt_group *opt_group_from_mask(unsigned int *mask);
151 extern struct opt_group *opt_group_cat_from_mask(unsigned int *mask);
152 extern struct fio_option *fio_option_find(const char *name);
153 extern unsigned int fio_get_kb_base(void *);