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 *);
21 extern struct fio_option fio_options[FIO_MAX_OPTS];
23 static inline int o_match(struct fio_option *o, const char *opt)
25 if (!strcmp(o->name, opt))
27 else if (o->alias && !strcmp(o->alias, opt))
33 static inline struct fio_option *find_option(struct fio_option *options,
38 for (o = &options[0]; o->name; o++)
51 __FIO_OPT_C_GENERAL = 0,
58 FIO_OPT_C_GENERAL = (1U << __FIO_OPT_C_GENERAL),
59 FIO_OPT_C_IO = (1U << __FIO_OPT_C_IO),
60 FIO_OPT_C_FILE = (1U << __FIO_OPT_C_FILE),
61 FIO_OPT_C_STAT = (1U << __FIO_OPT_C_STAT),
62 FIO_OPT_C_LOG = (1U << __FIO_OPT_C_LOG),
63 FIO_OPT_C_INVALID = (1U << __FIO_OPT_C_NR),
66 enum opt_category_group {
84 __FIO_OPT_G_THINKTIME,
89 FIO_OPT_G_RATE = (1U << __FIO_OPT_G_RATE),
90 FIO_OPT_G_ZONE = (1U << __FIO_OPT_G_ZONE),
91 FIO_OPT_G_RWMIX = (1U << __FIO_OPT_G_RWMIX),
92 FIO_OPT_G_VERIFY = (1U << __FIO_OPT_G_VERIFY),
93 FIO_OPT_G_TRIM = (1U << __FIO_OPT_G_TRIM),
94 FIO_OPT_G_IOLOG = (1U << __FIO_OPT_G_IOLOG),
95 FIO_OPT_G_IO_DEPTH = (1U << __FIO_OPT_G_IO_DEPTH),
96 FIO_OPT_G_IO_FLOW = (1U << __FIO_OPT_G_IO_FLOW),
97 FIO_OPT_G_DESC = (1U << __FIO_OPT_G_DESC),
98 FIO_OPT_G_FILENAME = (1U << __FIO_OPT_G_FILENAME),
99 FIO_OPT_G_IO_BASIC = (1U << __FIO_OPT_G_IO_BASIC),
100 FIO_OPT_G_CGROUP = (1U << __FIO_OPT_G_CGROUP),
101 FIO_OPT_G_RUNTIME = (1U << __FIO_OPT_G_RUNTIME),
102 FIO_OPT_G_PROCESS = (1U << __FIO_OPT_G_PROCESS),
103 FIO_OPT_G_CRED = (1U << __FIO_OPT_G_CRED),
104 FIO_OPT_G_CLOCK = (1U << __FIO_OPT_G_CLOCK),
105 FIO_OPT_G_IO_TYPE = (1U << __FIO_OPT_G_IO_TYPE),
106 FIO_OPT_G_THINKTIME = (1U << __FIO_OPT_G_THINKTIME),
107 FIO_OPT_G_RANDOM = (1U << __FIO_OPT_G_RANDOM),
108 FIO_OPT_G_IO_BUF = (1U << __FIO_OPT_G_IO_BUF),
109 FIO_OPT_G_INVALID = (1U << __FIO_OPT_G_NR),
112 extern struct opt_group *opt_group_from_mask(unsigned int *mask);
113 extern struct opt_group *opt_group_cat_from_mask(unsigned int *mask);
114 extern struct fio_option *fio_option_find(const char *name);
115 extern unsigned int fio_get_kb_base(void *);