18 #include "crc/crc32c.h"
21 * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
23 static char *get_opt_postfix(const char *str)
25 char *p = strstr(str, ":");
31 strip_blank_front(&p);
36 static int converthexchartoint(char a)
56 static int bs_cmp(const void *p1, const void *p2)
58 const struct bssplit *bsp1 = p1;
59 const struct bssplit *bsp2 = p2;
61 return bsp1->perc < bsp2->perc;
64 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
66 struct bssplit *bssplit;
67 unsigned int i, perc, perc_missing;
68 unsigned int max_bs, min_bs;
72 o->bssplit_nr[ddir] = 4;
73 bssplit = malloc(4 * sizeof(struct bssplit));
78 while ((fname = strsep(&str, ":")) != NULL) {
85 * grow struct buffer, if needed
87 if (i == o->bssplit_nr[ddir]) {
88 o->bssplit_nr[ddir] <<= 1;
89 bssplit = realloc(bssplit, o->bssplit_nr[ddir]
90 * sizeof(struct bssplit));
93 perc_str = strstr(fname, "/");
97 perc = atoi(perc_str);
105 if (str_to_decimal(fname, &val, 1, o, 0)) {
106 log_err("fio: bssplit conversion failed\n");
117 bssplit[i].perc = perc;
121 o->bssplit_nr[ddir] = i;
124 * Now check if the percentages add up, and how much is missing
126 perc = perc_missing = 0;
127 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
128 struct bssplit *bsp = &bssplit[i];
130 if (bsp->perc == (unsigned char) -1)
137 log_err("fio: bssplit percentages add to more than 100%%\n");
142 * If values didn't have a percentage set, divide the remains between
146 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
147 struct bssplit *bsp = &bssplit[i];
149 if (bsp->perc == (unsigned char) -1)
150 bsp->perc = (100 - perc) / perc_missing;
154 o->min_bs[ddir] = min_bs;
155 o->max_bs[ddir] = max_bs;
158 * now sort based on percentages, for ease of lookup
160 qsort(bssplit, o->bssplit_nr[ddir], sizeof(struct bssplit), bs_cmp);
161 o->bssplit[ddir] = bssplit;
165 static int str_bssplit_cb(void *data, const char *input)
167 struct thread_data *td = data;
168 char *str, *p, *odir, *ddir;
174 p = str = strdup(input);
176 strip_blank_front(&str);
177 strip_blank_end(str);
179 odir = strchr(str, ',');
181 ddir = strchr(odir + 1, ',');
183 ret = bssplit_ddir(&td->o, DDIR_TRIM, ddir + 1);
189 op = strdup(odir + 1);
190 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
195 ret = bssplit_ddir(&td->o, DDIR_WRITE, odir + 1);
198 ret = bssplit_ddir(&td->o, DDIR_READ, str);
204 ret = bssplit_ddir(&td->o, DDIR_WRITE, op);
209 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
212 ret = bssplit_ddir(&td->o, DDIR_READ, str);
219 static int str2error(char *str)
221 const char *err[] = { "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO",
222 "ENXIO", "E2BIG", "ENOEXEC", "EBADF",
223 "ECHILD", "EAGAIN", "ENOMEM", "EACCES",
224 "EFAULT", "ENOTBLK", "EBUSY", "EEXIST",
225 "EXDEV", "ENODEV", "ENOTDIR", "EISDIR",
226 "EINVAL", "ENFILE", "EMFILE", "ENOTTY",
227 "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE",
228 "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" };
229 int i = 0, num = sizeof(err) / sizeof(void *);
232 if (!strcmp(err[i], str))
239 static int ignore_error_type(struct thread_data *td, int etype, char *str)
245 if (etype >= ERROR_TYPE_CNT) {
246 log_err("Illegal error type\n");
250 td->o.ignore_error_nr[etype] = 4;
251 error = malloc(4 * sizeof(struct bssplit));
254 while ((fname = strsep(&str, ":")) != NULL) {
260 * grow struct buffer, if needed
262 if (i == td->o.ignore_error_nr[etype]) {
263 td->o.ignore_error_nr[etype] <<= 1;
264 error = realloc(error, td->o.ignore_error_nr[etype]
267 if (fname[0] == 'E') {
268 error[i] = str2error(fname);
270 error[i] = atoi(fname);
272 error[i] = -error[i];
275 log_err("Unknown error %s, please use number value \n",
283 td->o.continue_on_error |= 1 << etype;
284 td->o.ignore_error_nr[etype] = i;
285 td->o.ignore_error[etype] = error;
293 static int str_ignore_error_cb(void *data, const char *input)
295 struct thread_data *td = data;
297 int type = 0, ret = 1;
302 p = str = strdup(input);
304 strip_blank_front(&str);
305 strip_blank_end(str);
311 ret = ignore_error_type(td, type, p);
321 static int str_rw_cb(void *data, const char *str)
323 struct thread_data *td = data;
324 struct thread_options *o = &td->o;
333 nr = get_opt_postfix(str);
338 o->ddir_seq_nr = atoi(nr);
342 if (str_to_decimal(nr, &val, 1, o, 0)) {
343 log_err("fio: rw postfix parsing failed\n");
348 o->ddir_seq_add = val;
355 static int str_mem_cb(void *data, const char *mem)
357 struct thread_data *td = data;
359 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
360 td->o.mmapfile = get_opt_postfix(mem);
365 static int fio_clock_source_cb(void *data, const char *str)
367 struct thread_data *td = data;
369 fio_clock_source = td->o.clocksource;
370 fio_clock_source_set = 1;
375 static int str_rwmix_read_cb(void *data, unsigned long long *val)
377 struct thread_data *td = data;
379 td->o.rwmix[DDIR_READ] = *val;
380 td->o.rwmix[DDIR_WRITE] = 100 - *val;
384 static int str_rwmix_write_cb(void *data, unsigned long long *val)
386 struct thread_data *td = data;
388 td->o.rwmix[DDIR_WRITE] = *val;
389 td->o.rwmix[DDIR_READ] = 100 - *val;
393 static int str_exitall_cb(void)
395 exitall_on_terminate = 1;
399 #ifdef FIO_HAVE_CPU_AFFINITY
400 int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
402 unsigned int i, index, cpus_in_mask;
403 const long max_cpu = cpus_online();
405 cpus_in_mask = fio_cpu_count(mask);
406 cpu_index = cpu_index % cpus_in_mask;
409 for (i = 0; i < max_cpu; i++) {
410 if (!fio_cpu_isset(mask, i))
413 if (cpu_index != index)
414 fio_cpu_clear(mask, i);
419 return fio_cpu_count(mask);
422 static int str_cpumask_cb(void *data, unsigned long long *val)
424 struct thread_data *td = data;
432 ret = fio_cpuset_init(&td->o.cpumask);
434 log_err("fio: cpuset_init failed\n");
435 td_verror(td, ret, "fio_cpuset_init");
439 max_cpu = cpus_online();
441 for (i = 0; i < sizeof(int) * 8; i++) {
442 if ((1 << i) & *val) {
444 log_err("fio: CPU %d too large (max=%ld)\n", i,
448 dprint(FD_PARSE, "set cpu allowed %d\n", i);
449 fio_cpu_set(&td->o.cpumask, i);
453 td->o.cpumask_set = 1;
457 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
464 ret = fio_cpuset_init(mask);
466 log_err("fio: cpuset_init failed\n");
467 td_verror(td, ret, "fio_cpuset_init");
471 p = str = strdup(input);
473 strip_blank_front(&str);
474 strip_blank_end(str);
476 max_cpu = cpus_online();
478 while ((cpu = strsep(&str, ",")) != NULL) {
487 while ((cpu2 = strsep(&str2, "-")) != NULL) {
497 while (icpu <= icpu2) {
498 if (icpu >= FIO_MAX_CPUS) {
499 log_err("fio: your OS only supports up to"
500 " %d CPUs\n", (int) FIO_MAX_CPUS);
504 if (icpu > max_cpu) {
505 log_err("fio: CPU %d too large (max=%ld)\n",
511 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
512 fio_cpu_set(mask, icpu);
521 td->o.cpumask_set = 1;
525 static int str_cpus_allowed_cb(void *data, const char *input)
527 struct thread_data *td = data;
533 ret = set_cpus_allowed(td, &td->o.cpumask, input);
535 td->o.cpumask_set = 1;
540 static int str_verify_cpus_allowed_cb(void *data, const char *input)
542 struct thread_data *td = data;
545 ret = set_cpus_allowed(td, &td->o.verify_cpumask, input);
547 td->o.verify_cpumask_set = 1;
553 #ifdef CONFIG_LIBNUMA
554 static int str_numa_cpunodes_cb(void *data, char *input)
556 struct thread_data *td = data;
557 struct bitmask *verify_bitmask;
562 /* numa_parse_nodestring() parses a character string list
563 * of nodes into a bit mask. The bit mask is allocated by
564 * numa_allocate_nodemask(), so it should be freed by
565 * numa_free_nodemask().
567 verify_bitmask = numa_parse_nodestring(input);
568 if (verify_bitmask == NULL) {
569 log_err("fio: numa_parse_nodestring failed\n");
570 td_verror(td, 1, "str_numa_cpunodes_cb");
573 numa_free_nodemask(verify_bitmask);
575 td->o.numa_cpunodes = strdup(input);
576 td->o.numa_cpumask_set = 1;
580 static int str_numa_mpol_cb(void *data, char *input)
582 struct thread_data *td = data;
583 const char * const policy_types[] =
584 { "default", "prefer", "bind", "interleave", "local", NULL };
587 struct bitmask *verify_bitmask;
592 nodelist = strchr(input, ':');
594 /* NUL-terminate mode */
598 for (i = 0; i <= MPOL_LOCAL; i++) {
599 if (!strcmp(input, policy_types[i])) {
600 td->o.numa_mem_mode = i;
604 if (i > MPOL_LOCAL) {
605 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
609 switch (td->o.numa_mem_mode) {
612 * Insist on a nodelist of one node only
615 char *rest = nodelist;
616 while (isdigit(*rest))
619 log_err("fio: one node only for \'prefer\'\n");
623 log_err("fio: one node is needed for \'prefer\'\n");
627 case MPOL_INTERLEAVE:
629 * Default to online nodes with memory if no nodelist
632 nodelist = strdup("all");
637 * Don't allow a nodelist
640 log_err("fio: NO nodelist for \'local\'\n");
646 * Insist on a nodelist
649 log_err("fio: a nodelist is needed for \'bind\'\n");
656 /* numa_parse_nodestring() parses a character string list
657 * of nodes into a bit mask. The bit mask is allocated by
658 * numa_allocate_nodemask(), so it should be freed by
659 * numa_free_nodemask().
661 switch (td->o.numa_mem_mode) {
663 td->o.numa_mem_prefer_node = atoi(nodelist);
665 case MPOL_INTERLEAVE:
667 verify_bitmask = numa_parse_nodestring(nodelist);
668 if (verify_bitmask == NULL) {
669 log_err("fio: numa_parse_nodestring failed\n");
670 td_verror(td, 1, "str_numa_memnodes_cb");
673 td->o.numa_memnodes = strdup(nodelist);
674 numa_free_nodemask(verify_bitmask);
683 td->o.numa_memmask_set = 1;
691 static int str_fst_cb(void *data, const char *str)
693 struct thread_data *td = data;
694 char *nr = get_opt_postfix(str);
696 td->file_service_nr = 1;
698 td->file_service_nr = atoi(nr);
705 #ifdef CONFIG_SYNC_FILE_RANGE
706 static int str_sfr_cb(void *data, const char *str)
708 struct thread_data *td = data;
709 char *nr = get_opt_postfix(str);
711 td->sync_file_range_nr = 1;
713 td->sync_file_range_nr = atoi(nr);
721 static int str_random_distribution_cb(void *data, const char *str)
723 struct thread_data *td = data;
730 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
732 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
737 nr = get_opt_postfix(str);
738 if (nr && !str_to_float(nr, &val)) {
739 log_err("fio: random postfix parsing failed\n");
746 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
748 log_err("fio: zipf theta must different than 1.0\n");
751 td->o.zipf_theta.u.f = val;
753 if (val <= 0.00 || val >= 1.00) {
754 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
757 td->o.pareto_h.u.f = val;
764 * Return next name in the string. Files are separated with ':'. If the ':'
765 * is escaped with a '\', then that ':' is part of the filename and does not
766 * indicate a new file.
768 static char *get_next_name(char **ptr)
773 if (!str || !strlen(str))
779 * No colon, we are done
781 p = strchr(str, ':');
788 * We got a colon, but it's the first character. Skip and
796 if (*(p - 1) != '\\') {
802 memmove(p - 1, p, strlen(p) + 1);
810 static int get_max_name_idx(char *input)
812 unsigned int cur_idx;
815 p = str = strdup(input);
816 for (cur_idx = 0; ; cur_idx++)
817 if (get_next_name(&str) == NULL)
825 * Returns the directory at the index, indexes > entires will be
826 * assigned via modulo division of the index
828 int set_name_idx(char *target, char *input, int index)
830 unsigned int cur_idx;
832 char *fname, *str, *p;
834 p = str = strdup(input);
836 index %= get_max_name_idx(input);
837 for (cur_idx = 0; cur_idx <= index; cur_idx++)
838 fname = get_next_name(&str);
840 len = sprintf(target, "%s/", fname);
846 static int str_filename_cb(void *data, const char *input)
848 struct thread_data *td = data;
849 char *fname, *str, *p;
851 p = str = strdup(input);
853 strip_blank_front(&str);
854 strip_blank_end(str);
856 if (!td->files_index)
859 while ((fname = get_next_name(&str)) != NULL) {
862 add_file(td, fname, 0, 1);
869 static int str_directory_cb(void *data, const char fio_unused *unused)
871 struct thread_data *td = data;
873 char *dirname, *str, *p;
879 p = str = strdup(td->o.directory);
880 while ((dirname = get_next_name(&str)) != NULL) {
881 if (lstat(dirname, &sb) < 0) {
884 log_err("fio: %s is not a directory\n", dirname);
885 td_verror(td, ret, "lstat");
888 if (!S_ISDIR(sb.st_mode)) {
889 log_err("fio: %s is not a directory\n", dirname);
900 static int str_lockfile_cb(void *data, const char fio_unused *str)
902 struct thread_data *td = data;
904 if (td->files_index) {
905 log_err("fio: lockfile= option must precede filename=\n");
912 static int str_opendir_cb(void *data, const char fio_unused *str)
914 struct thread_data *td = data;
919 if (!td->files_index)
922 return add_dir_files(td, td->o.opendir);
925 static int pattern_cb(char *pattern, unsigned int max_size,
926 const char *input, unsigned int *pattern_bytes)
929 int i = 0, j = 0, len, k, base = 10;
930 uint32_t pattern_length;
933 loc1 = strstr(input, "0x");
934 loc2 = strstr(input, "0X");
937 off = strtol(input, NULL, base);
938 if (off != LONG_MAX || errno != ERANGE) {
940 pattern[i] = off & 0xff;
949 j = loc1 - input + 2;
951 j = loc2 - input + 2;
954 if (len - j < max_size * 2) {
956 off = converthexchartoint(input[k--]);
958 off += (converthexchartoint(input[k--])
960 pattern[i++] = (char) off;
966 * Fill the pattern all the way to the end. This greatly reduces
967 * the number of memcpy's we have to do when verifying the IO.
970 while (i > 1 && i * 2 <= max_size) {
971 memcpy(&pattern[i], &pattern[0], i);
976 * Fill remainder, if the pattern multiple ends up not being
979 while (i > 1 && i < max_size) {
980 unsigned int b = min(pattern_length, max_size - i);
982 memcpy(&pattern[i], &pattern[0], b);
988 * The code in verify_io_u_pattern assumes a single byte pattern
989 * fills the whole verify pattern buffer.
991 memset(pattern, pattern[0], max_size);
998 static int str_buffer_pattern_cb(void *data, const char *input)
1000 struct thread_data *td = data;
1003 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
1004 &td->o.buffer_pattern_bytes);
1007 td->o.refill_buffers = 0;
1008 td->o.scramble_buffers = 0;
1009 td->o.zero_buffers = 0;
1015 static int str_buffer_compress_cb(void *data, unsigned long long *il)
1017 struct thread_data *td = data;
1019 td->flags |= TD_F_COMPRESS;
1020 td->o.compress_percentage = *il;
1024 static int str_verify_pattern_cb(void *data, const char *input)
1026 struct thread_data *td = data;
1029 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
1030 &td->o.verify_pattern_bytes);
1033 * VERIFY_META could already be set
1035 if (!ret && td->o.verify == VERIFY_NONE)
1036 td->o.verify = VERIFY_PATTERN;
1041 static int str_gtod_reduce_cb(void *data, int *il)
1043 struct thread_data *td = data;
1046 td->o.disable_lat = !!val;
1047 td->o.disable_clat = !!val;
1048 td->o.disable_slat = !!val;
1049 td->o.disable_bw = !!val;
1050 td->o.clat_percentiles = !val;
1052 td->tv_cache_mask = 63;
1057 static int str_gtod_cpu_cb(void *data, long long *il)
1059 struct thread_data *td = data;
1062 td->o.gtod_cpu = val;
1063 td->o.gtod_offload = 1;
1067 static int str_size_cb(void *data, unsigned long long *__val)
1069 struct thread_data *td = data;
1070 unsigned long long v = *__val;
1072 if (parse_is_percent(v)) {
1074 td->o.size_percent = -1ULL - v;
1081 static int rw_verify(struct fio_option *o, void *data)
1083 struct thread_data *td = data;
1085 if (read_only && td_write(td)) {
1086 log_err("fio: job <%s> has write bit set, but fio is in"
1087 " read-only mode\n", td->o.name);
1094 static int gtod_cpu_verify(struct fio_option *o, void *data)
1096 #ifndef FIO_HAVE_CPU_AFFINITY
1097 struct thread_data *td = data;
1099 if (td->o.gtod_cpu) {
1100 log_err("fio: platform must support CPU affinity for"
1101 "gettimeofday() offloading\n");
1112 static struct opt_group fio_opt_groups[] = {
1115 .mask = FIO_OPT_C_GENERAL,
1119 .mask = FIO_OPT_C_IO,
1123 .mask = FIO_OPT_C_FILE,
1126 .name = "Statistics",
1127 .mask = FIO_OPT_C_STAT,
1131 .mask = FIO_OPT_C_LOG,
1135 .mask = FIO_OPT_C_PROFILE,
1142 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1143 unsigned int inv_mask)
1145 struct opt_group *og;
1148 if (*mask == inv_mask || !*mask)
1151 for (i = 0; ogs[i].name; i++) {
1154 if (*mask & og->mask) {
1155 *mask &= ~(og->mask);
1163 struct opt_group *opt_group_from_mask(unsigned int *mask)
1165 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1168 static struct opt_group fio_opt_cat_groups[] = {
1170 .name = "Latency profiling",
1171 .mask = FIO_OPT_G_LATPROF,
1175 .mask = FIO_OPT_G_RATE,
1179 .mask = FIO_OPT_G_ZONE,
1182 .name = "Read/write mix",
1183 .mask = FIO_OPT_G_RWMIX,
1187 .mask = FIO_OPT_G_VERIFY,
1191 .mask = FIO_OPT_G_TRIM,
1194 .name = "I/O Logging",
1195 .mask = FIO_OPT_G_IOLOG,
1198 .name = "I/O Depth",
1199 .mask = FIO_OPT_G_IO_DEPTH,
1203 .mask = FIO_OPT_G_IO_FLOW,
1206 .name = "Description",
1207 .mask = FIO_OPT_G_DESC,
1211 .mask = FIO_OPT_G_FILENAME,
1214 .name = "General I/O",
1215 .mask = FIO_OPT_G_IO_BASIC,
1219 .mask = FIO_OPT_G_CGROUP,
1223 .mask = FIO_OPT_G_RUNTIME,
1227 .mask = FIO_OPT_G_PROCESS,
1230 .name = "Job credentials / priority",
1231 .mask = FIO_OPT_G_CRED,
1234 .name = "Clock settings",
1235 .mask = FIO_OPT_G_CLOCK,
1239 .mask = FIO_OPT_G_IO_TYPE,
1242 .name = "I/O Thinktime",
1243 .mask = FIO_OPT_G_THINKTIME,
1246 .name = "Randomizations",
1247 .mask = FIO_OPT_G_RANDOM,
1250 .name = "I/O buffers",
1251 .mask = FIO_OPT_G_IO_BUF,
1254 .name = "Tiobench profile",
1255 .mask = FIO_OPT_G_TIOBENCH,
1263 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1265 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1269 * Map of job/command line options
1271 struct fio_option fio_options[FIO_MAX_OPTS] = {
1273 .name = "description",
1274 .lname = "Description of job",
1275 .type = FIO_OPT_STR_STORE,
1276 .off1 = td_var_offset(description),
1277 .help = "Text job description",
1278 .category = FIO_OPT_C_GENERAL,
1279 .group = FIO_OPT_G_DESC,
1283 .lname = "Job name",
1284 .type = FIO_OPT_STR_STORE,
1285 .off1 = td_var_offset(name),
1286 .help = "Name of this job",
1287 .category = FIO_OPT_C_GENERAL,
1288 .group = FIO_OPT_G_DESC,
1292 .lname = "Filename(s)",
1293 .type = FIO_OPT_STR_STORE,
1294 .off1 = td_var_offset(filename),
1295 .cb = str_filename_cb,
1296 .prio = -1, /* must come after "directory" */
1297 .help = "File(s) to use for the workload",
1298 .category = FIO_OPT_C_FILE,
1299 .group = FIO_OPT_G_FILENAME,
1302 .name = "directory",
1303 .lname = "Directory",
1304 .type = FIO_OPT_STR_STORE,
1305 .off1 = td_var_offset(directory),
1306 .cb = str_directory_cb,
1307 .help = "Directory to store files in",
1308 .category = FIO_OPT_C_FILE,
1309 .group = FIO_OPT_G_FILENAME,
1312 .name = "filename_format",
1313 .type = FIO_OPT_STR_STORE,
1314 .off1 = td_var_offset(filename_format),
1315 .prio = -1, /* must come after "directory" */
1316 .help = "Override default $jobname.$jobnum.$filenum naming",
1317 .def = "$jobname.$jobnum.$filenum",
1318 .category = FIO_OPT_C_FILE,
1319 .group = FIO_OPT_G_FILENAME,
1323 .lname = "Lockfile",
1324 .type = FIO_OPT_STR,
1325 .off1 = td_var_offset(file_lock_mode),
1326 .help = "Lock file when doing IO to it",
1328 .parent = "filename",
1331 .cb = str_lockfile_cb,
1332 .category = FIO_OPT_C_FILE,
1333 .group = FIO_OPT_G_FILENAME,
1336 .oval = FILE_LOCK_NONE,
1337 .help = "No file locking",
1339 { .ival = "exclusive",
1340 .oval = FILE_LOCK_EXCLUSIVE,
1341 .help = "Exclusive file lock",
1344 .ival = "readwrite",
1345 .oval = FILE_LOCK_READWRITE,
1346 .help = "Read vs write lock",
1352 .lname = "Open directory",
1353 .type = FIO_OPT_STR_STORE,
1354 .off1 = td_var_offset(opendir),
1355 .cb = str_opendir_cb,
1356 .help = "Recursively add files from this directory and down",
1357 .category = FIO_OPT_C_FILE,
1358 .group = FIO_OPT_G_FILENAME,
1362 .lname = "Read/write",
1363 .alias = "readwrite",
1364 .type = FIO_OPT_STR,
1366 .off1 = td_var_offset(td_ddir),
1367 .help = "IO direction",
1369 .verify = rw_verify,
1370 .category = FIO_OPT_C_IO,
1371 .group = FIO_OPT_G_IO_BASIC,
1374 .oval = TD_DDIR_READ,
1375 .help = "Sequential read",
1378 .oval = TD_DDIR_WRITE,
1379 .help = "Sequential write",
1382 .oval = TD_DDIR_TRIM,
1383 .help = "Sequential trim",
1385 { .ival = "randread",
1386 .oval = TD_DDIR_RANDREAD,
1387 .help = "Random read",
1389 { .ival = "randwrite",
1390 .oval = TD_DDIR_RANDWRITE,
1391 .help = "Random write",
1393 { .ival = "randtrim",
1394 .oval = TD_DDIR_RANDTRIM,
1395 .help = "Random trim",
1399 .help = "Sequential read and write mix",
1401 { .ival = "readwrite",
1403 .help = "Sequential read and write mix",
1406 .oval = TD_DDIR_RANDRW,
1407 .help = "Random read and write mix"
1412 .name = "rw_sequencer",
1413 .lname = "RW Sequencer",
1414 .type = FIO_OPT_STR,
1415 .off1 = td_var_offset(rw_seq),
1416 .help = "IO offset generator modifier",
1417 .def = "sequential",
1418 .category = FIO_OPT_C_IO,
1419 .group = FIO_OPT_G_IO_BASIC,
1421 { .ival = "sequential",
1423 .help = "Generate sequential offsets",
1425 { .ival = "identical",
1426 .oval = RW_SEQ_IDENT,
1427 .help = "Generate identical offsets",
1434 .lname = "IO Engine",
1435 .type = FIO_OPT_STR_STORE,
1436 .off1 = td_var_offset(ioengine),
1437 .help = "IO engine to use",
1438 .def = FIO_PREFERRED_ENGINE,
1439 .category = FIO_OPT_C_IO,
1440 .group = FIO_OPT_G_IO_BASIC,
1443 .help = "Use read/write",
1446 .help = "Use pread/pwrite",
1449 .help = "Use readv/writev",
1451 #ifdef CONFIG_PWRITEV
1453 .help = "Use preadv/pwritev",
1456 #ifdef CONFIG_LIBAIO
1458 .help = "Linux native asynchronous IO",
1461 #ifdef CONFIG_POSIXAIO
1462 { .ival = "posixaio",
1463 .help = "POSIX asynchronous IO",
1466 #ifdef CONFIG_SOLARISAIO
1467 { .ival = "solarisaio",
1468 .help = "Solaris native asynchronous IO",
1471 #ifdef CONFIG_WINDOWSAIO
1472 { .ival = "windowsaio",
1473 .help = "Windows native asynchronous IO"
1478 .help = "Rados Block Device asynchronous IO"
1482 .help = "Memory mapped IO"
1484 #ifdef CONFIG_LINUX_SPLICE
1486 .help = "splice/vmsplice based IO",
1488 { .ival = "netsplice",
1489 .help = "splice/vmsplice to/from the network",
1492 #ifdef FIO_HAVE_SGIO
1494 .help = "SCSI generic v3 IO",
1498 .help = "Testing engine (no data transfer)",
1501 .help = "Network IO",
1504 .help = "CPU cycle burner engine",
1508 .help = "GUASI IO engine",
1511 #ifdef FIO_HAVE_BINJECT
1512 { .ival = "binject",
1513 .help = "binject direct inject block engine",
1518 .help = "RDMA IO engine",
1521 #ifdef CONFIG_FUSION_AW
1522 { .ival = "fusion-aw-sync",
1523 .help = "Fusion-io atomic write engine",
1526 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1527 { .ival = "e4defrag",
1528 .help = "ext4 defrag engine",
1531 #ifdef CONFIG_LINUX_FALLOCATE
1533 .help = "fallocate() file based engine",
1538 .help = "Glusterfs libgfapi(sync) based engine"
1540 { .ival = "gfapi_async",
1541 .help = "Glusterfs libgfapi(async) based engine"
1545 { .ival = "external",
1546 .help = "Load external engine (append name)",
1552 .lname = "IO Depth",
1553 .type = FIO_OPT_INT,
1554 .off1 = td_var_offset(iodepth),
1555 .help = "Number of IO buffers to keep in flight",
1559 .category = FIO_OPT_C_IO,
1560 .group = FIO_OPT_G_IO_BASIC,
1563 .name = "iodepth_batch",
1564 .lname = "IO Depth batch",
1565 .alias = "iodepth_batch_submit",
1566 .type = FIO_OPT_INT,
1567 .off1 = td_var_offset(iodepth_batch),
1568 .help = "Number of IO buffers to submit in one go",
1569 .parent = "iodepth",
1574 .category = FIO_OPT_C_IO,
1575 .group = FIO_OPT_G_IO_BASIC,
1578 .name = "iodepth_batch_complete",
1579 .lname = "IO Depth batch complete",
1580 .type = FIO_OPT_INT,
1581 .off1 = td_var_offset(iodepth_batch_complete),
1582 .help = "Number of IO buffers to retrieve in one go",
1583 .parent = "iodepth",
1588 .category = FIO_OPT_C_IO,
1589 .group = FIO_OPT_G_IO_BASIC,
1592 .name = "iodepth_low",
1593 .lname = "IO Depth batch low",
1594 .type = FIO_OPT_INT,
1595 .off1 = td_var_offset(iodepth_low),
1596 .help = "Low water mark for queuing depth",
1597 .parent = "iodepth",
1600 .category = FIO_OPT_C_IO,
1601 .group = FIO_OPT_G_IO_BASIC,
1606 .type = FIO_OPT_STR_VAL,
1608 .help = "Total size of device or files",
1609 .interval = 1024 * 1024,
1610 .category = FIO_OPT_C_IO,
1611 .group = FIO_OPT_G_INVALID,
1615 .lname = "IO Limit",
1616 .type = FIO_OPT_STR_VAL,
1617 .off1 = td_var_offset(io_limit),
1618 .interval = 1024 * 1024,
1619 .category = FIO_OPT_C_IO,
1620 .group = FIO_OPT_G_INVALID,
1623 .name = "fill_device",
1624 .lname = "Fill device",
1626 .type = FIO_OPT_BOOL,
1627 .off1 = td_var_offset(fill_device),
1628 .help = "Write until an ENOSPC error occurs",
1630 .category = FIO_OPT_C_FILE,
1631 .group = FIO_OPT_G_INVALID,
1635 .lname = "File size",
1636 .type = FIO_OPT_STR_VAL,
1637 .off1 = td_var_offset(file_size_low),
1638 .off2 = td_var_offset(file_size_high),
1640 .help = "Size of individual files",
1641 .interval = 1024 * 1024,
1642 .category = FIO_OPT_C_FILE,
1643 .group = FIO_OPT_G_INVALID,
1646 .name = "file_append",
1647 .lname = "File append",
1648 .type = FIO_OPT_BOOL,
1649 .off1 = td_var_offset(file_append),
1650 .help = "IO will start at the end of the file(s)",
1652 .category = FIO_OPT_C_FILE,
1653 .group = FIO_OPT_G_INVALID,
1657 .lname = "IO offset",
1658 .alias = "fileoffset",
1659 .type = FIO_OPT_STR_VAL,
1660 .off1 = td_var_offset(start_offset),
1661 .help = "Start IO from this offset",
1663 .interval = 1024 * 1024,
1664 .category = FIO_OPT_C_IO,
1665 .group = FIO_OPT_G_INVALID,
1668 .name = "offset_increment",
1669 .lname = "IO offset increment",
1670 .type = FIO_OPT_STR_VAL,
1671 .off1 = td_var_offset(offset_increment),
1672 .help = "What is the increment from one offset to the next",
1676 .interval = 1024 * 1024,
1677 .category = FIO_OPT_C_IO,
1678 .group = FIO_OPT_G_INVALID,
1681 .name = "number_ios",
1682 .lname = "Number of IOs to perform",
1683 .type = FIO_OPT_STR_VAL,
1684 .off1 = td_var_offset(number_ios),
1685 .help = "Force job completion of this number of IOs",
1687 .category = FIO_OPT_C_IO,
1688 .group = FIO_OPT_G_INVALID,
1692 .lname = "Block size",
1693 .alias = "blocksize",
1694 .type = FIO_OPT_INT,
1695 .off1 = td_var_offset(bs[DDIR_READ]),
1696 .off2 = td_var_offset(bs[DDIR_WRITE]),
1697 .off3 = td_var_offset(bs[DDIR_TRIM]),
1699 .help = "Block size unit",
1704 .category = FIO_OPT_C_IO,
1705 .group = FIO_OPT_G_INVALID,
1709 .lname = "Block size align",
1710 .alias = "blockalign",
1711 .type = FIO_OPT_INT,
1712 .off1 = td_var_offset(ba[DDIR_READ]),
1713 .off2 = td_var_offset(ba[DDIR_WRITE]),
1714 .off3 = td_var_offset(ba[DDIR_TRIM]),
1716 .help = "IO block offset alignment",
1720 .category = FIO_OPT_C_IO,
1721 .group = FIO_OPT_G_INVALID,
1725 .lname = "Block size range",
1726 .alias = "blocksize_range",
1727 .type = FIO_OPT_RANGE,
1728 .off1 = td_var_offset(min_bs[DDIR_READ]),
1729 .off2 = td_var_offset(max_bs[DDIR_READ]),
1730 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1731 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1732 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1733 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1735 .help = "Set block size range (in more detail than bs)",
1739 .category = FIO_OPT_C_IO,
1740 .group = FIO_OPT_G_INVALID,
1744 .lname = "Block size split",
1745 .type = FIO_OPT_STR,
1746 .cb = str_bssplit_cb,
1747 .help = "Set a specific mix of block sizes",
1750 .category = FIO_OPT_C_IO,
1751 .group = FIO_OPT_G_INVALID,
1754 .name = "bs_unaligned",
1755 .lname = "Block size unaligned",
1756 .alias = "blocksize_unaligned",
1757 .type = FIO_OPT_STR_SET,
1758 .off1 = td_var_offset(bs_unaligned),
1759 .help = "Don't sector align IO buffer sizes",
1762 .category = FIO_OPT_C_IO,
1763 .group = FIO_OPT_G_INVALID,
1766 .name = "bs_is_seq_rand",
1767 .lname = "Block size division is seq/random (not read/write)",
1768 .type = FIO_OPT_BOOL,
1769 .off1 = td_var_offset(bs_is_seq_rand),
1770 .help = "Consider any blocksize setting to be sequential,ramdom",
1772 .parent = "blocksize",
1773 .category = FIO_OPT_C_IO,
1774 .group = FIO_OPT_G_INVALID,
1777 .name = "randrepeat",
1778 .lname = "Random repeatable",
1779 .type = FIO_OPT_BOOL,
1780 .off1 = td_var_offset(rand_repeatable),
1781 .help = "Use repeatable random IO pattern",
1785 .category = FIO_OPT_C_IO,
1786 .group = FIO_OPT_G_RANDOM,
1790 .lname = "The random generator seed",
1791 .type = FIO_OPT_STR_VAL,
1792 .off1 = td_var_offset(rand_seed),
1793 .help = "Set the random generator seed value",
1795 .category = FIO_OPT_C_IO,
1796 .group = FIO_OPT_G_RANDOM,
1799 .name = "use_os_rand",
1800 .lname = "Use OS random",
1801 .type = FIO_OPT_BOOL,
1802 .off1 = td_var_offset(use_os_rand),
1803 .help = "Set to use OS random generator",
1807 .category = FIO_OPT_C_IO,
1808 .group = FIO_OPT_G_RANDOM,
1811 .name = "norandommap",
1812 .lname = "No randommap",
1813 .type = FIO_OPT_STR_SET,
1814 .off1 = td_var_offset(norandommap),
1815 .help = "Accept potential duplicate random blocks",
1819 .category = FIO_OPT_C_IO,
1820 .group = FIO_OPT_G_RANDOM,
1823 .name = "softrandommap",
1824 .lname = "Soft randommap",
1825 .type = FIO_OPT_BOOL,
1826 .off1 = td_var_offset(softrandommap),
1827 .help = "Set norandommap if randommap allocation fails",
1828 .parent = "norandommap",
1831 .category = FIO_OPT_C_IO,
1832 .group = FIO_OPT_G_RANDOM,
1835 .name = "random_generator",
1836 .type = FIO_OPT_STR,
1837 .off1 = td_var_offset(random_generator),
1838 .help = "Type of random number generator to use",
1839 .def = "tausworthe",
1841 { .ival = "tausworthe",
1842 .oval = FIO_RAND_GEN_TAUSWORTHE,
1843 .help = "Strong Tausworthe generator",
1846 .oval = FIO_RAND_GEN_LFSR,
1847 .help = "Variable length LFSR",
1850 .category = FIO_OPT_C_IO,
1851 .group = FIO_OPT_G_RANDOM,
1854 .name = "random_distribution",
1855 .type = FIO_OPT_STR,
1856 .off1 = td_var_offset(random_distribution),
1857 .cb = str_random_distribution_cb,
1858 .help = "Random offset distribution generator",
1862 .oval = FIO_RAND_DIST_RANDOM,
1863 .help = "Completely random",
1866 .oval = FIO_RAND_DIST_ZIPF,
1867 .help = "Zipf distribution",
1870 .oval = FIO_RAND_DIST_PARETO,
1871 .help = "Pareto distribution",
1874 .category = FIO_OPT_C_IO,
1875 .group = FIO_OPT_G_RANDOM,
1878 .name = "percentage_random",
1879 .lname = "Percentage Random",
1880 .type = FIO_OPT_INT,
1881 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1882 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1883 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1885 .help = "Percentage of seq/random mix that should be random",
1886 .def = "100,100,100",
1888 .inverse = "percentage_sequential",
1889 .category = FIO_OPT_C_IO,
1890 .group = FIO_OPT_G_RANDOM,
1893 .name = "percentage_sequential",
1894 .lname = "Percentage Sequential",
1895 .type = FIO_OPT_DEPRECATED,
1896 .category = FIO_OPT_C_IO,
1897 .group = FIO_OPT_G_RANDOM,
1900 .name = "allrandrepeat",
1901 .type = FIO_OPT_BOOL,
1902 .off1 = td_var_offset(allrand_repeatable),
1903 .help = "Use repeatable random numbers for everything",
1905 .category = FIO_OPT_C_IO,
1906 .group = FIO_OPT_G_RANDOM,
1910 .lname = "Number of files",
1911 .alias = "nr_files",
1912 .type = FIO_OPT_INT,
1913 .off1 = td_var_offset(nr_files),
1914 .help = "Split job workload between this number of files",
1917 .category = FIO_OPT_C_FILE,
1918 .group = FIO_OPT_G_INVALID,
1921 .name = "openfiles",
1922 .lname = "Number of open files",
1923 .type = FIO_OPT_INT,
1924 .off1 = td_var_offset(open_files),
1925 .help = "Number of files to keep open at the same time",
1926 .category = FIO_OPT_C_FILE,
1927 .group = FIO_OPT_G_INVALID,
1930 .name = "file_service_type",
1931 .lname = "File service type",
1932 .type = FIO_OPT_STR,
1934 .off1 = td_var_offset(file_service_type),
1935 .help = "How to select which file to service next",
1936 .def = "roundrobin",
1937 .category = FIO_OPT_C_FILE,
1938 .group = FIO_OPT_G_INVALID,
1941 .oval = FIO_FSERVICE_RANDOM,
1942 .help = "Choose a file at random",
1944 { .ival = "roundrobin",
1945 .oval = FIO_FSERVICE_RR,
1946 .help = "Round robin select files",
1948 { .ival = "sequential",
1949 .oval = FIO_FSERVICE_SEQ,
1950 .help = "Finish one file before moving to the next",
1953 .parent = "nrfiles",
1956 #ifdef CONFIG_POSIX_FALLOCATE
1958 .name = "fallocate",
1959 .lname = "Fallocate",
1960 .type = FIO_OPT_STR,
1961 .off1 = td_var_offset(fallocate_mode),
1962 .help = "Whether pre-allocation is performed when laying out files",
1964 .category = FIO_OPT_C_FILE,
1965 .group = FIO_OPT_G_INVALID,
1968 .oval = FIO_FALLOCATE_NONE,
1969 .help = "Do not pre-allocate space",
1972 .oval = FIO_FALLOCATE_POSIX,
1973 .help = "Use posix_fallocate()",
1975 #ifdef CONFIG_LINUX_FALLOCATE
1977 .oval = FIO_FALLOCATE_KEEP_SIZE,
1978 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
1981 /* Compatibility with former boolean values */
1983 .oval = FIO_FALLOCATE_NONE,
1984 .help = "Alias for 'none'",
1987 .oval = FIO_FALLOCATE_POSIX,
1988 .help = "Alias for 'posix'",
1992 #endif /* CONFIG_POSIX_FALLOCATE */
1994 .name = "fadvise_hint",
1995 .lname = "Fadvise hint",
1996 .type = FIO_OPT_BOOL,
1997 .off1 = td_var_offset(fadvise_hint),
1998 .help = "Use fadvise() to advise the kernel on IO pattern",
2000 .category = FIO_OPT_C_FILE,
2001 .group = FIO_OPT_G_INVALID,
2006 .type = FIO_OPT_INT,
2007 .off1 = td_var_offset(fsync_blocks),
2008 .help = "Issue fsync for writes every given number of blocks",
2011 .category = FIO_OPT_C_FILE,
2012 .group = FIO_OPT_G_INVALID,
2015 .name = "fdatasync",
2016 .lname = "Fdatasync",
2017 .type = FIO_OPT_INT,
2018 .off1 = td_var_offset(fdatasync_blocks),
2019 .help = "Issue fdatasync for writes every given number of blocks",
2022 .category = FIO_OPT_C_FILE,
2023 .group = FIO_OPT_G_INVALID,
2026 .name = "write_barrier",
2027 .lname = "Write barrier",
2028 .type = FIO_OPT_INT,
2029 .off1 = td_var_offset(barrier_blocks),
2030 .help = "Make every Nth write a barrier write",
2033 .category = FIO_OPT_C_IO,
2034 .group = FIO_OPT_G_INVALID,
2036 #ifdef CONFIG_SYNC_FILE_RANGE
2038 .name = "sync_file_range",
2039 .lname = "Sync file range",
2041 { .ival = "wait_before",
2042 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
2043 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
2047 .oval = SYNC_FILE_RANGE_WRITE,
2048 .help = "SYNC_FILE_RANGE_WRITE",
2052 .ival = "wait_after",
2053 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
2054 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
2058 .type = FIO_OPT_STR_MULTI,
2060 .off1 = td_var_offset(sync_file_range),
2061 .help = "Use sync_file_range()",
2062 .category = FIO_OPT_C_FILE,
2063 .group = FIO_OPT_G_INVALID,
2068 .lname = "Direct I/O",
2069 .type = FIO_OPT_BOOL,
2070 .off1 = td_var_offset(odirect),
2071 .help = "Use O_DIRECT IO (negates buffered)",
2073 .inverse = "buffered",
2074 .category = FIO_OPT_C_IO,
2075 .group = FIO_OPT_G_IO_TYPE,
2079 .lname = "Atomic I/O",
2080 .type = FIO_OPT_BOOL,
2081 .off1 = td_var_offset(oatomic),
2082 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
2084 .category = FIO_OPT_C_IO,
2085 .group = FIO_OPT_G_IO_TYPE,
2089 .lname = "Buffered I/O",
2090 .type = FIO_OPT_BOOL,
2091 .off1 = td_var_offset(odirect),
2093 .help = "Use buffered IO (negates direct)",
2095 .inverse = "direct",
2096 .category = FIO_OPT_C_IO,
2097 .group = FIO_OPT_G_IO_TYPE,
2100 .name = "overwrite",
2101 .lname = "Overwrite",
2102 .type = FIO_OPT_BOOL,
2103 .off1 = td_var_offset(overwrite),
2104 .help = "When writing, set whether to overwrite current data",
2106 .category = FIO_OPT_C_FILE,
2107 .group = FIO_OPT_G_INVALID,
2112 .type = FIO_OPT_INT,
2113 .off1 = td_var_offset(loops),
2114 .help = "Number of times to run the job",
2117 .category = FIO_OPT_C_GENERAL,
2118 .group = FIO_OPT_G_RUNTIME,
2122 .lname = "Number of jobs",
2123 .type = FIO_OPT_INT,
2124 .off1 = td_var_offset(numjobs),
2125 .help = "Duplicate this job this many times",
2128 .category = FIO_OPT_C_GENERAL,
2129 .group = FIO_OPT_G_RUNTIME,
2132 .name = "startdelay",
2133 .lname = "Start delay",
2134 .type = FIO_OPT_STR_VAL_TIME,
2135 .off1 = td_var_offset(start_delay),
2136 .off2 = td_var_offset(start_delay_high),
2137 .help = "Only start job when this period has passed",
2140 .category = FIO_OPT_C_GENERAL,
2141 .group = FIO_OPT_G_RUNTIME,
2147 .type = FIO_OPT_STR_VAL_TIME,
2148 .off1 = td_var_offset(timeout),
2149 .help = "Stop workload when this amount of time has passed",
2152 .category = FIO_OPT_C_GENERAL,
2153 .group = FIO_OPT_G_RUNTIME,
2156 .name = "time_based",
2157 .lname = "Time based",
2158 .type = FIO_OPT_STR_SET,
2159 .off1 = td_var_offset(time_based),
2160 .help = "Keep running until runtime/timeout is met",
2161 .category = FIO_OPT_C_GENERAL,
2162 .group = FIO_OPT_G_RUNTIME,
2165 .name = "verify_only",
2166 .lname = "Verify only",
2167 .type = FIO_OPT_STR_SET,
2168 .off1 = td_var_offset(verify_only),
2169 .help = "Verifies previously written data is still valid",
2170 .category = FIO_OPT_C_GENERAL,
2171 .group = FIO_OPT_G_RUNTIME,
2174 .name = "ramp_time",
2175 .lname = "Ramp time",
2176 .type = FIO_OPT_STR_VAL_TIME,
2177 .off1 = td_var_offset(ramp_time),
2178 .help = "Ramp up time before measuring performance",
2180 .category = FIO_OPT_C_GENERAL,
2181 .group = FIO_OPT_G_RUNTIME,
2184 .name = "clocksource",
2185 .lname = "Clock source",
2186 .type = FIO_OPT_STR,
2187 .cb = fio_clock_source_cb,
2188 .off1 = td_var_offset(clocksource),
2189 .help = "What type of timing source to use",
2190 .category = FIO_OPT_C_GENERAL,
2191 .group = FIO_OPT_G_CLOCK,
2193 #ifdef CONFIG_GETTIMEOFDAY
2194 { .ival = "gettimeofday",
2196 .help = "Use gettimeofday(2) for timing",
2199 #ifdef CONFIG_CLOCK_GETTIME
2200 { .ival = "clock_gettime",
2201 .oval = CS_CGETTIME,
2202 .help = "Use clock_gettime(2) for timing",
2205 #ifdef ARCH_HAVE_CPU_CLOCK
2207 .oval = CS_CPUCLOCK,
2208 .help = "Use CPU private clock",
2216 .lname = "I/O Memory",
2217 .type = FIO_OPT_STR,
2219 .off1 = td_var_offset(mem_type),
2220 .help = "Backing type for IO buffers",
2222 .category = FIO_OPT_C_IO,
2223 .group = FIO_OPT_G_INVALID,
2227 .help = "Use malloc(3) for IO buffers",
2231 .help = "Use shared memory segments for IO buffers",
2233 #ifdef FIO_HAVE_HUGETLB
2234 { .ival = "shmhuge",
2235 .oval = MEM_SHMHUGE,
2236 .help = "Like shm, but use huge pages",
2241 .help = "Use mmap(2) (file or anon) for IO buffers",
2243 #ifdef FIO_HAVE_HUGETLB
2244 { .ival = "mmaphuge",
2245 .oval = MEM_MMAPHUGE,
2246 .help = "Like mmap, but use huge pages",
2252 .name = "iomem_align",
2253 .alias = "mem_align",
2254 .lname = "I/O memory alignment",
2255 .type = FIO_OPT_INT,
2256 .off1 = td_var_offset(mem_align),
2258 .help = "IO memory buffer offset alignment",
2262 .category = FIO_OPT_C_IO,
2263 .group = FIO_OPT_G_INVALID,
2268 .type = FIO_OPT_STR,
2269 .off1 = td_var_offset(verify),
2270 .help = "Verify data written",
2272 .category = FIO_OPT_C_IO,
2273 .group = FIO_OPT_G_VERIFY,
2276 .oval = VERIFY_NONE,
2277 .help = "Don't do IO verification",
2281 .help = "Use md5 checksums for verification",
2284 .oval = VERIFY_CRC64,
2285 .help = "Use crc64 checksums for verification",
2288 .oval = VERIFY_CRC32,
2289 .help = "Use crc32 checksums for verification",
2291 { .ival = "crc32c-intel",
2292 .oval = VERIFY_CRC32C,
2293 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2296 .oval = VERIFY_CRC32C,
2297 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2300 .oval = VERIFY_CRC16,
2301 .help = "Use crc16 checksums for verification",
2304 .oval = VERIFY_CRC7,
2305 .help = "Use crc7 checksums for verification",
2308 .oval = VERIFY_SHA1,
2309 .help = "Use sha1 checksums for verification",
2312 .oval = VERIFY_SHA256,
2313 .help = "Use sha256 checksums for verification",
2316 .oval = VERIFY_SHA512,
2317 .help = "Use sha512 checksums for verification",
2320 .oval = VERIFY_XXHASH,
2321 .help = "Use xxhash checksums for verification",
2324 .oval = VERIFY_META,
2325 .help = "Use io information",
2329 .oval = VERIFY_NULL,
2330 .help = "Pretend to verify",
2335 .name = "do_verify",
2336 .lname = "Perform verify step",
2337 .type = FIO_OPT_BOOL,
2338 .off1 = td_var_offset(do_verify),
2339 .help = "Run verification stage after write",
2343 .category = FIO_OPT_C_IO,
2344 .group = FIO_OPT_G_VERIFY,
2347 .name = "verifysort",
2348 .lname = "Verify sort",
2349 .type = FIO_OPT_BOOL,
2350 .off1 = td_var_offset(verifysort),
2351 .help = "Sort written verify blocks for read back",
2355 .category = FIO_OPT_C_IO,
2356 .group = FIO_OPT_G_VERIFY,
2359 .name = "verifysort_nr",
2360 .type = FIO_OPT_INT,
2361 .off1 = td_var_offset(verifysort_nr),
2362 .help = "Pre-load and sort verify blocks for a read workload",
2367 .category = FIO_OPT_C_IO,
2368 .group = FIO_OPT_G_VERIFY,
2371 .name = "verify_interval",
2372 .lname = "Verify interval",
2373 .type = FIO_OPT_INT,
2374 .off1 = td_var_offset(verify_interval),
2375 .minval = 2 * sizeof(struct verify_header),
2376 .help = "Store verify buffer header every N bytes",
2379 .interval = 2 * sizeof(struct verify_header),
2380 .category = FIO_OPT_C_IO,
2381 .group = FIO_OPT_G_VERIFY,
2384 .name = "verify_offset",
2385 .lname = "Verify offset",
2386 .type = FIO_OPT_INT,
2387 .help = "Offset verify header location by N bytes",
2388 .off1 = td_var_offset(verify_offset),
2389 .minval = sizeof(struct verify_header),
2392 .category = FIO_OPT_C_IO,
2393 .group = FIO_OPT_G_VERIFY,
2396 .name = "verify_pattern",
2397 .lname = "Verify pattern",
2398 .type = FIO_OPT_STR,
2399 .cb = str_verify_pattern_cb,
2400 .help = "Fill pattern for IO buffers",
2403 .category = FIO_OPT_C_IO,
2404 .group = FIO_OPT_G_VERIFY,
2407 .name = "verify_fatal",
2408 .lname = "Verify fatal",
2409 .type = FIO_OPT_BOOL,
2410 .off1 = td_var_offset(verify_fatal),
2412 .help = "Exit on a single verify failure, don't continue",
2415 .category = FIO_OPT_C_IO,
2416 .group = FIO_OPT_G_VERIFY,
2419 .name = "verify_dump",
2420 .lname = "Verify dump",
2421 .type = FIO_OPT_BOOL,
2422 .off1 = td_var_offset(verify_dump),
2424 .help = "Dump contents of good and bad blocks on failure",
2427 .category = FIO_OPT_C_IO,
2428 .group = FIO_OPT_G_VERIFY,
2431 .name = "verify_async",
2432 .lname = "Verify asynchronously",
2433 .type = FIO_OPT_INT,
2434 .off1 = td_var_offset(verify_async),
2436 .help = "Number of async verifier threads to use",
2439 .category = FIO_OPT_C_IO,
2440 .group = FIO_OPT_G_VERIFY,
2443 .name = "verify_backlog",
2444 .lname = "Verify backlog",
2445 .type = FIO_OPT_STR_VAL,
2446 .off1 = td_var_offset(verify_backlog),
2447 .help = "Verify after this number of blocks are written",
2450 .category = FIO_OPT_C_IO,
2451 .group = FIO_OPT_G_VERIFY,
2454 .name = "verify_backlog_batch",
2455 .lname = "Verify backlog batch",
2456 .type = FIO_OPT_INT,
2457 .off1 = td_var_offset(verify_batch),
2458 .help = "Verify this number of IO blocks",
2461 .category = FIO_OPT_C_IO,
2462 .group = FIO_OPT_G_VERIFY,
2464 #ifdef FIO_HAVE_CPU_AFFINITY
2466 .name = "verify_async_cpus",
2467 .lname = "Async verify CPUs",
2468 .type = FIO_OPT_STR,
2469 .cb = str_verify_cpus_allowed_cb,
2470 .help = "Set CPUs allowed for async verify threads",
2471 .parent = "verify_async",
2473 .category = FIO_OPT_C_IO,
2474 .group = FIO_OPT_G_VERIFY,
2478 .name = "experimental_verify",
2479 .off1 = td_var_offset(experimental_verify),
2480 .type = FIO_OPT_BOOL,
2481 .help = "Enable experimental verification",
2482 .category = FIO_OPT_C_IO,
2483 .group = FIO_OPT_G_VERIFY,
2485 #ifdef FIO_HAVE_TRIM
2487 .name = "trim_percentage",
2488 .lname = "Trim percentage",
2489 .type = FIO_OPT_INT,
2490 .off1 = td_var_offset(trim_percentage),
2493 .help = "Number of verify blocks to discard/trim",
2498 .category = FIO_OPT_C_IO,
2499 .group = FIO_OPT_G_TRIM,
2502 .name = "trim_verify_zero",
2503 .lname = "Verify trim zero",
2504 .type = FIO_OPT_BOOL,
2505 .help = "Verify that trim/discarded blocks are returned as zeroes",
2506 .off1 = td_var_offset(trim_zero),
2507 .parent = "trim_percentage",
2510 .category = FIO_OPT_C_IO,
2511 .group = FIO_OPT_G_TRIM,
2514 .name = "trim_backlog",
2515 .lname = "Trim backlog",
2516 .type = FIO_OPT_STR_VAL,
2517 .off1 = td_var_offset(trim_backlog),
2518 .help = "Trim after this number of blocks are written",
2519 .parent = "trim_percentage",
2522 .category = FIO_OPT_C_IO,
2523 .group = FIO_OPT_G_TRIM,
2526 .name = "trim_backlog_batch",
2527 .lname = "Trim backlog batch",
2528 .type = FIO_OPT_INT,
2529 .off1 = td_var_offset(trim_batch),
2530 .help = "Trim this number of IO blocks",
2531 .parent = "trim_percentage",
2534 .category = FIO_OPT_C_IO,
2535 .group = FIO_OPT_G_TRIM,
2539 .name = "write_iolog",
2540 .lname = "Write I/O log",
2541 .type = FIO_OPT_STR_STORE,
2542 .off1 = td_var_offset(write_iolog_file),
2543 .help = "Store IO pattern to file",
2544 .category = FIO_OPT_C_IO,
2545 .group = FIO_OPT_G_IOLOG,
2548 .name = "read_iolog",
2549 .lname = "Read I/O log",
2550 .type = FIO_OPT_STR_STORE,
2551 .off1 = td_var_offset(read_iolog_file),
2552 .help = "Playback IO pattern from file",
2553 .category = FIO_OPT_C_IO,
2554 .group = FIO_OPT_G_IOLOG,
2557 .name = "replay_no_stall",
2558 .lname = "Don't stall on replay",
2559 .type = FIO_OPT_BOOL,
2560 .off1 = td_var_offset(no_stall),
2562 .parent = "read_iolog",
2564 .help = "Playback IO pattern file as fast as possible without stalls",
2565 .category = FIO_OPT_C_IO,
2566 .group = FIO_OPT_G_IOLOG,
2569 .name = "replay_redirect",
2570 .lname = "Redirect device for replay",
2571 .type = FIO_OPT_STR_STORE,
2572 .off1 = td_var_offset(replay_redirect),
2573 .parent = "read_iolog",
2575 .help = "Replay all I/O onto this device, regardless of trace device",
2576 .category = FIO_OPT_C_IO,
2577 .group = FIO_OPT_G_IOLOG,
2580 .name = "exec_prerun",
2581 .lname = "Pre-execute runnable",
2582 .type = FIO_OPT_STR_STORE,
2583 .off1 = td_var_offset(exec_prerun),
2584 .help = "Execute this file prior to running job",
2585 .category = FIO_OPT_C_GENERAL,
2586 .group = FIO_OPT_G_INVALID,
2589 .name = "exec_postrun",
2590 .lname = "Post-execute runnable",
2591 .type = FIO_OPT_STR_STORE,
2592 .off1 = td_var_offset(exec_postrun),
2593 .help = "Execute this file after running job",
2594 .category = FIO_OPT_C_GENERAL,
2595 .group = FIO_OPT_G_INVALID,
2597 #ifdef FIO_HAVE_IOSCHED_SWITCH
2599 .name = "ioscheduler",
2600 .lname = "I/O scheduler",
2601 .type = FIO_OPT_STR_STORE,
2602 .off1 = td_var_offset(ioscheduler),
2603 .help = "Use this IO scheduler on the backing device",
2604 .category = FIO_OPT_C_FILE,
2605 .group = FIO_OPT_G_INVALID,
2610 .lname = "Zone size",
2611 .type = FIO_OPT_STR_VAL,
2612 .off1 = td_var_offset(zone_size),
2613 .help = "Amount of data to read per zone",
2615 .interval = 1024 * 1024,
2616 .category = FIO_OPT_C_IO,
2617 .group = FIO_OPT_G_ZONE,
2620 .name = "zonerange",
2621 .lname = "Zone range",
2622 .type = FIO_OPT_STR_VAL,
2623 .off1 = td_var_offset(zone_range),
2624 .help = "Give size of an IO zone",
2626 .interval = 1024 * 1024,
2627 .category = FIO_OPT_C_IO,
2628 .group = FIO_OPT_G_ZONE,
2632 .lname = "Zone skip",
2633 .type = FIO_OPT_STR_VAL,
2634 .off1 = td_var_offset(zone_skip),
2635 .help = "Space between IO zones",
2637 .interval = 1024 * 1024,
2638 .category = FIO_OPT_C_IO,
2639 .group = FIO_OPT_G_ZONE,
2643 .lname = "Lock memory",
2644 .type = FIO_OPT_STR_VAL,
2645 .off1 = td_var_offset(lockmem),
2646 .help = "Lock down this amount of memory (per worker)",
2648 .interval = 1024 * 1024,
2649 .category = FIO_OPT_C_GENERAL,
2650 .group = FIO_OPT_G_INVALID,
2653 .name = "rwmixread",
2654 .lname = "Read/write mix read",
2655 .type = FIO_OPT_INT,
2656 .cb = str_rwmix_read_cb,
2658 .help = "Percentage of mixed workload that is reads",
2661 .inverse = "rwmixwrite",
2662 .category = FIO_OPT_C_IO,
2663 .group = FIO_OPT_G_RWMIX,
2666 .name = "rwmixwrite",
2667 .lname = "Read/write mix write",
2668 .type = FIO_OPT_INT,
2669 .cb = str_rwmix_write_cb,
2671 .help = "Percentage of mixed workload that is writes",
2674 .inverse = "rwmixread",
2675 .category = FIO_OPT_C_IO,
2676 .group = FIO_OPT_G_RWMIX,
2679 .name = "rwmixcycle",
2680 .lname = "Read/write mix cycle",
2681 .type = FIO_OPT_DEPRECATED,
2682 .category = FIO_OPT_C_IO,
2683 .group = FIO_OPT_G_RWMIX,
2688 .type = FIO_OPT_INT,
2689 .off1 = td_var_offset(nice),
2690 .help = "Set job CPU nice value",
2695 .category = FIO_OPT_C_GENERAL,
2696 .group = FIO_OPT_G_CRED,
2698 #ifdef FIO_HAVE_IOPRIO
2701 .lname = "I/O nice priority",
2702 .type = FIO_OPT_INT,
2703 .off1 = td_var_offset(ioprio),
2704 .help = "Set job IO priority value",
2708 .category = FIO_OPT_C_GENERAL,
2709 .group = FIO_OPT_G_CRED,
2712 .name = "prioclass",
2713 .lname = "I/O nice priority class",
2714 .type = FIO_OPT_INT,
2715 .off1 = td_var_offset(ioprio_class),
2716 .help = "Set job IO priority class",
2720 .category = FIO_OPT_C_GENERAL,
2721 .group = FIO_OPT_G_CRED,
2725 .name = "thinktime",
2726 .lname = "Thinktime",
2727 .type = FIO_OPT_INT,
2728 .off1 = td_var_offset(thinktime),
2729 .help = "Idle time between IO buffers (usec)",
2731 .category = FIO_OPT_C_IO,
2732 .group = FIO_OPT_G_THINKTIME,
2735 .name = "thinktime_spin",
2736 .lname = "Thinktime spin",
2737 .type = FIO_OPT_INT,
2738 .off1 = td_var_offset(thinktime_spin),
2739 .help = "Start think time by spinning this amount (usec)",
2741 .parent = "thinktime",
2743 .category = FIO_OPT_C_IO,
2744 .group = FIO_OPT_G_THINKTIME,
2747 .name = "thinktime_blocks",
2748 .lname = "Thinktime blocks",
2749 .type = FIO_OPT_INT,
2750 .off1 = td_var_offset(thinktime_blocks),
2751 .help = "IO buffer period between 'thinktime'",
2753 .parent = "thinktime",
2755 .category = FIO_OPT_C_IO,
2756 .group = FIO_OPT_G_THINKTIME,
2760 .lname = "I/O rate",
2761 .type = FIO_OPT_INT,
2762 .off1 = td_var_offset(rate[DDIR_READ]),
2763 .off2 = td_var_offset(rate[DDIR_WRITE]),
2764 .off3 = td_var_offset(rate[DDIR_TRIM]),
2765 .help = "Set bandwidth rate",
2766 .category = FIO_OPT_C_IO,
2767 .group = FIO_OPT_G_RATE,
2771 .lname = "I/O min rate",
2772 .type = FIO_OPT_INT,
2773 .off1 = td_var_offset(ratemin[DDIR_READ]),
2774 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2775 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2776 .help = "Job must meet this rate or it will be shutdown",
2779 .category = FIO_OPT_C_IO,
2780 .group = FIO_OPT_G_RATE,
2783 .name = "rate_iops",
2784 .lname = "I/O rate IOPS",
2785 .type = FIO_OPT_INT,
2786 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2787 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2788 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2789 .help = "Limit IO used to this number of IO operations/sec",
2791 .category = FIO_OPT_C_IO,
2792 .group = FIO_OPT_G_RATE,
2795 .name = "rate_iops_min",
2796 .lname = "I/O min rate IOPS",
2797 .type = FIO_OPT_INT,
2798 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2799 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2800 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2801 .help = "Job must meet this rate or it will be shut down",
2802 .parent = "rate_iops",
2804 .category = FIO_OPT_C_IO,
2805 .group = FIO_OPT_G_RATE,
2808 .name = "ratecycle",
2809 .lname = "I/O rate cycle",
2810 .type = FIO_OPT_INT,
2811 .off1 = td_var_offset(ratecycle),
2812 .help = "Window average for rate limits (msec)",
2816 .category = FIO_OPT_C_IO,
2817 .group = FIO_OPT_G_RATE,
2820 .name = "max_latency",
2821 .type = FIO_OPT_INT,
2822 .off1 = td_var_offset(max_latency),
2823 .help = "Maximum tolerated IO latency (usec)",
2824 .category = FIO_OPT_C_IO,
2825 .group = FIO_OPT_G_LATPROF,
2828 .name = "latency_target",
2829 .lname = "Latency Target (usec)",
2830 .type = FIO_OPT_STR_VAL_TIME,
2831 .off1 = td_var_offset(latency_target),
2832 .help = "Ramp to max queue depth supporting this latency",
2833 .category = FIO_OPT_C_IO,
2834 .group = FIO_OPT_G_LATPROF,
2837 .name = "latency_window",
2838 .lname = "Latency Window (usec)",
2839 .type = FIO_OPT_STR_VAL_TIME,
2840 .off1 = td_var_offset(latency_window),
2841 .help = "Time to sustain latency_target",
2842 .category = FIO_OPT_C_IO,
2843 .group = FIO_OPT_G_LATPROF,
2846 .name = "latency_percentile",
2847 .lname = "Latency Percentile",
2848 .type = FIO_OPT_FLOAT_LIST,
2849 .off1 = td_var_offset(latency_percentile),
2850 .help = "Percentile of IOs must be below latency_target",
2855 .category = FIO_OPT_C_IO,
2856 .group = FIO_OPT_G_LATPROF,
2859 .name = "invalidate",
2860 .lname = "Cache invalidate",
2861 .type = FIO_OPT_BOOL,
2862 .off1 = td_var_offset(invalidate_cache),
2863 .help = "Invalidate buffer/page cache prior to running job",
2865 .category = FIO_OPT_C_IO,
2866 .group = FIO_OPT_G_IO_TYPE,
2870 .lname = "Synchronous I/O",
2871 .type = FIO_OPT_BOOL,
2872 .off1 = td_var_offset(sync_io),
2873 .help = "Use O_SYNC for buffered writes",
2875 .parent = "buffered",
2877 .category = FIO_OPT_C_IO,
2878 .group = FIO_OPT_G_IO_TYPE,
2881 .name = "create_serialize",
2882 .lname = "Create serialize",
2883 .type = FIO_OPT_BOOL,
2884 .off1 = td_var_offset(create_serialize),
2885 .help = "Serialize creating of job files",
2887 .category = FIO_OPT_C_FILE,
2888 .group = FIO_OPT_G_INVALID,
2891 .name = "create_fsync",
2892 .lname = "Create fsync",
2893 .type = FIO_OPT_BOOL,
2894 .off1 = td_var_offset(create_fsync),
2895 .help = "fsync file after creation",
2897 .category = FIO_OPT_C_FILE,
2898 .group = FIO_OPT_G_INVALID,
2901 .name = "create_on_open",
2902 .lname = "Create on open",
2903 .type = FIO_OPT_BOOL,
2904 .off1 = td_var_offset(create_on_open),
2905 .help = "Create files when they are opened for IO",
2907 .category = FIO_OPT_C_FILE,
2908 .group = FIO_OPT_G_INVALID,
2911 .name = "create_only",
2912 .type = FIO_OPT_BOOL,
2913 .off1 = td_var_offset(create_only),
2914 .help = "Only perform file creation phase",
2915 .category = FIO_OPT_C_FILE,
2920 .lname = "Pre-read files",
2921 .type = FIO_OPT_BOOL,
2922 .off1 = td_var_offset(pre_read),
2923 .help = "Pre-read files before starting official testing",
2925 .category = FIO_OPT_C_FILE,
2926 .group = FIO_OPT_G_INVALID,
2928 #ifdef FIO_HAVE_CPU_AFFINITY
2931 .lname = "CPU mask",
2932 .type = FIO_OPT_INT,
2933 .cb = str_cpumask_cb,
2934 .help = "CPU affinity mask",
2935 .category = FIO_OPT_C_GENERAL,
2936 .group = FIO_OPT_G_CRED,
2939 .name = "cpus_allowed",
2940 .lname = "CPUs allowed",
2941 .type = FIO_OPT_STR,
2942 .cb = str_cpus_allowed_cb,
2943 .help = "Set CPUs allowed",
2944 .category = FIO_OPT_C_GENERAL,
2945 .group = FIO_OPT_G_CRED,
2948 .name = "cpus_allowed_policy",
2949 .lname = "CPUs allowed distribution policy",
2950 .type = FIO_OPT_STR,
2951 .off1 = td_var_offset(cpus_allowed_policy),
2952 .help = "Distribution policy for cpus_allowed",
2953 .parent = "cpus_allowed",
2957 .oval = FIO_CPUS_SHARED,
2958 .help = "Mask shared between threads",
2961 .oval = FIO_CPUS_SPLIT,
2962 .help = "Mask split between threads",
2965 .category = FIO_OPT_C_GENERAL,
2966 .group = FIO_OPT_G_CRED,
2969 #ifdef CONFIG_LIBNUMA
2971 .name = "numa_cpu_nodes",
2972 .type = FIO_OPT_STR,
2973 .cb = str_numa_cpunodes_cb,
2974 .help = "NUMA CPU nodes bind",
2975 .category = FIO_OPT_C_GENERAL,
2976 .group = FIO_OPT_G_INVALID,
2979 .name = "numa_mem_policy",
2980 .type = FIO_OPT_STR,
2981 .cb = str_numa_mpol_cb,
2982 .help = "NUMA memory policy setup",
2983 .category = FIO_OPT_C_GENERAL,
2984 .group = FIO_OPT_G_INVALID,
2988 .name = "end_fsync",
2989 .lname = "End fsync",
2990 .type = FIO_OPT_BOOL,
2991 .off1 = td_var_offset(end_fsync),
2992 .help = "Include fsync at the end of job",
2994 .category = FIO_OPT_C_FILE,
2995 .group = FIO_OPT_G_INVALID,
2998 .name = "fsync_on_close",
2999 .lname = "Fsync on close",
3000 .type = FIO_OPT_BOOL,
3001 .off1 = td_var_offset(fsync_on_close),
3002 .help = "fsync files on close",
3004 .category = FIO_OPT_C_FILE,
3005 .group = FIO_OPT_G_INVALID,
3009 .lname = "Unlink file",
3010 .type = FIO_OPT_BOOL,
3011 .off1 = td_var_offset(unlink),
3012 .help = "Unlink created files after job has completed",
3014 .category = FIO_OPT_C_FILE,
3015 .group = FIO_OPT_G_INVALID,
3019 .lname = "Exit-all on terminate",
3020 .type = FIO_OPT_STR_SET,
3021 .cb = str_exitall_cb,
3022 .help = "Terminate all jobs when one exits",
3023 .category = FIO_OPT_C_GENERAL,
3024 .group = FIO_OPT_G_PROCESS,
3027 .name = "stonewall",
3028 .lname = "Wait for previous",
3029 .alias = "wait_for_previous",
3030 .type = FIO_OPT_STR_SET,
3031 .off1 = td_var_offset(stonewall),
3032 .help = "Insert a hard barrier between this job and previous",
3033 .category = FIO_OPT_C_GENERAL,
3034 .group = FIO_OPT_G_PROCESS,
3037 .name = "new_group",
3038 .lname = "New group",
3039 .type = FIO_OPT_STR_SET,
3040 .off1 = td_var_offset(new_group),
3041 .help = "Mark the start of a new group (for reporting)",
3042 .category = FIO_OPT_C_GENERAL,
3043 .group = FIO_OPT_G_PROCESS,
3048 .type = FIO_OPT_STR_SET,
3049 .off1 = td_var_offset(use_thread),
3050 .help = "Use threads instead of processes",
3051 .category = FIO_OPT_C_GENERAL,
3052 .group = FIO_OPT_G_PROCESS,
3055 .name = "write_bw_log",
3056 .lname = "Write bandwidth log",
3057 .type = FIO_OPT_STR_STORE,
3058 .off1 = td_var_offset(bw_log_file),
3059 .help = "Write log of bandwidth during run",
3060 .category = FIO_OPT_C_LOG,
3061 .group = FIO_OPT_G_INVALID,
3064 .name = "write_lat_log",
3065 .lname = "Write latency log",
3066 .type = FIO_OPT_STR_STORE,
3067 .off1 = td_var_offset(lat_log_file),
3068 .help = "Write log of latency during run",
3069 .category = FIO_OPT_C_LOG,
3070 .group = FIO_OPT_G_INVALID,
3073 .name = "write_iops_log",
3074 .lname = "Write IOPS log",
3075 .type = FIO_OPT_STR_STORE,
3076 .off1 = td_var_offset(iops_log_file),
3077 .help = "Write log of IOPS during run",
3078 .category = FIO_OPT_C_LOG,
3079 .group = FIO_OPT_G_INVALID,
3082 .name = "log_avg_msec",
3083 .lname = "Log averaging (msec)",
3084 .type = FIO_OPT_INT,
3085 .off1 = td_var_offset(log_avg_msec),
3086 .help = "Average bw/iops/lat logs over this period of time",
3088 .category = FIO_OPT_C_LOG,
3089 .group = FIO_OPT_G_INVALID,
3092 .name = "bwavgtime",
3093 .lname = "Bandwidth average time",
3094 .type = FIO_OPT_INT,
3095 .off1 = td_var_offset(bw_avg_time),
3096 .help = "Time window over which to calculate bandwidth"
3099 .parent = "write_bw_log",
3102 .category = FIO_OPT_C_LOG,
3103 .group = FIO_OPT_G_INVALID,
3106 .name = "iopsavgtime",
3107 .lname = "IOPS average time",
3108 .type = FIO_OPT_INT,
3109 .off1 = td_var_offset(iops_avg_time),
3110 .help = "Time window over which to calculate IOPS (msec)",
3112 .parent = "write_iops_log",
3115 .category = FIO_OPT_C_LOG,
3116 .group = FIO_OPT_G_INVALID,
3119 .name = "group_reporting",
3120 .lname = "Group reporting",
3121 .type = FIO_OPT_STR_SET,
3122 .off1 = td_var_offset(group_reporting),
3123 .help = "Do reporting on a per-group basis",
3124 .category = FIO_OPT_C_STAT,
3125 .group = FIO_OPT_G_INVALID,
3128 .name = "zero_buffers",
3129 .lname = "Zero I/O buffers",
3130 .type = FIO_OPT_STR_SET,
3131 .off1 = td_var_offset(zero_buffers),
3132 .help = "Init IO buffers to all zeroes",
3133 .category = FIO_OPT_C_IO,
3134 .group = FIO_OPT_G_IO_BUF,
3137 .name = "refill_buffers",
3138 .lname = "Refill I/O buffers",
3139 .type = FIO_OPT_STR_SET,
3140 .off1 = td_var_offset(refill_buffers),
3141 .help = "Refill IO buffers on every IO submit",
3142 .category = FIO_OPT_C_IO,
3143 .group = FIO_OPT_G_IO_BUF,
3146 .name = "scramble_buffers",
3147 .lname = "Scramble I/O buffers",
3148 .type = FIO_OPT_BOOL,
3149 .off1 = td_var_offset(scramble_buffers),
3150 .help = "Slightly scramble buffers on every IO submit",
3152 .category = FIO_OPT_C_IO,
3153 .group = FIO_OPT_G_IO_BUF,
3156 .name = "buffer_pattern",
3157 .lname = "Buffer pattern",
3158 .type = FIO_OPT_STR,
3159 .cb = str_buffer_pattern_cb,
3160 .help = "Fill pattern for IO buffers",
3161 .category = FIO_OPT_C_IO,
3162 .group = FIO_OPT_G_IO_BUF,
3165 .name = "buffer_compress_percentage",
3166 .lname = "Buffer compression percentage",
3167 .type = FIO_OPT_INT,
3168 .cb = str_buffer_compress_cb,
3171 .help = "How compressible the buffer is (approximately)",
3173 .category = FIO_OPT_C_IO,
3174 .group = FIO_OPT_G_IO_BUF,
3177 .name = "buffer_compress_chunk",
3178 .lname = "Buffer compression chunk size",
3179 .type = FIO_OPT_INT,
3180 .off1 = td_var_offset(compress_chunk),
3181 .parent = "buffer_compress_percentage",
3183 .help = "Size of compressible region in buffer",
3185 .category = FIO_OPT_C_IO,
3186 .group = FIO_OPT_G_IO_BUF,
3189 .name = "clat_percentiles",
3190 .lname = "Completion latency percentiles",
3191 .type = FIO_OPT_BOOL,
3192 .off1 = td_var_offset(clat_percentiles),
3193 .help = "Enable the reporting of completion latency percentiles",
3195 .category = FIO_OPT_C_STAT,
3196 .group = FIO_OPT_G_INVALID,
3199 .name = "percentile_list",
3200 .lname = "Completion latency percentile list",
3201 .type = FIO_OPT_FLOAT_LIST,
3202 .off1 = td_var_offset(percentile_list),
3203 .off2 = td_var_offset(percentile_precision),
3204 .help = "Specify a custom list of percentiles to report",
3205 .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99",
3206 .maxlen = FIO_IO_U_LIST_MAX_LEN,
3209 .category = FIO_OPT_C_STAT,
3210 .group = FIO_OPT_G_INVALID,
3213 #ifdef FIO_HAVE_DISK_UTIL
3215 .name = "disk_util",
3216 .lname = "Disk utilization",
3217 .type = FIO_OPT_BOOL,
3218 .off1 = td_var_offset(do_disk_util),
3219 .help = "Log disk utilization statistics",
3221 .category = FIO_OPT_C_STAT,
3222 .group = FIO_OPT_G_INVALID,
3226 .name = "gtod_reduce",
3227 .lname = "Reduce gettimeofday() calls",
3228 .type = FIO_OPT_BOOL,
3229 .help = "Greatly reduce number of gettimeofday() calls",
3230 .cb = str_gtod_reduce_cb,
3233 .category = FIO_OPT_C_STAT,
3234 .group = FIO_OPT_G_INVALID,
3237 .name = "disable_lat",
3238 .lname = "Disable all latency stats",
3239 .type = FIO_OPT_BOOL,
3240 .off1 = td_var_offset(disable_lat),
3241 .help = "Disable latency numbers",
3242 .parent = "gtod_reduce",
3245 .category = FIO_OPT_C_STAT,
3246 .group = FIO_OPT_G_INVALID,
3249 .name = "disable_clat",
3250 .lname = "Disable completion latency stats",
3251 .type = FIO_OPT_BOOL,
3252 .off1 = td_var_offset(disable_clat),
3253 .help = "Disable completion latency numbers",
3254 .parent = "gtod_reduce",
3257 .category = FIO_OPT_C_STAT,
3258 .group = FIO_OPT_G_INVALID,
3261 .name = "disable_slat",
3262 .lname = "Disable submission latency stats",
3263 .type = FIO_OPT_BOOL,
3264 .off1 = td_var_offset(disable_slat),
3265 .help = "Disable submission latency numbers",
3266 .parent = "gtod_reduce",
3269 .category = FIO_OPT_C_STAT,
3270 .group = FIO_OPT_G_INVALID,
3273 .name = "disable_bw_measurement",
3274 .lname = "Disable bandwidth stats",
3275 .type = FIO_OPT_BOOL,
3276 .off1 = td_var_offset(disable_bw),
3277 .help = "Disable bandwidth logging",
3278 .parent = "gtod_reduce",
3281 .category = FIO_OPT_C_STAT,
3282 .group = FIO_OPT_G_INVALID,
3286 .lname = "Dedicated gettimeofday() CPU",
3287 .type = FIO_OPT_INT,
3288 .cb = str_gtod_cpu_cb,
3289 .help = "Set up dedicated gettimeofday() thread on this CPU",
3290 .verify = gtod_cpu_verify,
3291 .category = FIO_OPT_C_GENERAL,
3292 .group = FIO_OPT_G_CLOCK,
3295 .name = "unified_rw_reporting",
3296 .type = FIO_OPT_BOOL,
3297 .off1 = td_var_offset(unified_rw_rep),
3298 .help = "Unify reporting across data direction",
3300 .category = FIO_OPT_C_GENERAL,
3301 .group = FIO_OPT_G_INVALID,
3304 .name = "continue_on_error",
3305 .lname = "Continue on error",
3306 .type = FIO_OPT_STR,
3307 .off1 = td_var_offset(continue_on_error),
3308 .help = "Continue on non-fatal errors during IO",
3310 .category = FIO_OPT_C_GENERAL,
3311 .group = FIO_OPT_G_ERR,
3314 .oval = ERROR_TYPE_NONE,
3315 .help = "Exit when an error is encountered",
3318 .oval = ERROR_TYPE_READ,
3319 .help = "Continue on read errors only",
3322 .oval = ERROR_TYPE_WRITE,
3323 .help = "Continue on write errors only",
3326 .oval = ERROR_TYPE_READ | ERROR_TYPE_WRITE,
3327 .help = "Continue on any IO errors",
3330 .oval = ERROR_TYPE_VERIFY,
3331 .help = "Continue on verify errors only",
3334 .oval = ERROR_TYPE_ANY,
3335 .help = "Continue on all io and verify errors",
3338 .oval = ERROR_TYPE_NONE,
3339 .help = "Alias for 'none'",
3342 .oval = ERROR_TYPE_ANY,
3343 .help = "Alias for 'all'",
3348 .name = "ignore_error",
3349 .type = FIO_OPT_STR,
3350 .cb = str_ignore_error_cb,
3351 .help = "Set a specific list of errors to ignore",
3353 .category = FIO_OPT_C_GENERAL,
3354 .group = FIO_OPT_G_ERR,
3357 .name = "error_dump",
3358 .type = FIO_OPT_BOOL,
3359 .off1 = td_var_offset(error_dump),
3361 .help = "Dump info on each error",
3362 .category = FIO_OPT_C_GENERAL,
3363 .group = FIO_OPT_G_ERR,
3368 .type = FIO_OPT_STR_STORE,
3369 .off1 = td_var_offset(profile),
3370 .help = "Select a specific builtin performance test",
3371 .category = FIO_OPT_C_PROFILE,
3372 .group = FIO_OPT_G_INVALID,
3377 .type = FIO_OPT_STR_STORE,
3378 .off1 = td_var_offset(cgroup),
3379 .help = "Add job to cgroup of this name",
3380 .category = FIO_OPT_C_GENERAL,
3381 .group = FIO_OPT_G_CGROUP,
3384 .name = "cgroup_nodelete",
3385 .lname = "Cgroup no-delete",
3386 .type = FIO_OPT_BOOL,
3387 .off1 = td_var_offset(cgroup_nodelete),
3388 .help = "Do not delete cgroups after job completion",
3391 .category = FIO_OPT_C_GENERAL,
3392 .group = FIO_OPT_G_CGROUP,
3395 .name = "cgroup_weight",
3396 .lname = "Cgroup weight",
3397 .type = FIO_OPT_INT,
3398 .off1 = td_var_offset(cgroup_weight),
3399 .help = "Use given weight for cgroup",
3403 .category = FIO_OPT_C_GENERAL,
3404 .group = FIO_OPT_G_CGROUP,
3409 .type = FIO_OPT_INT,
3410 .off1 = td_var_offset(uid),
3411 .help = "Run job with this user ID",
3412 .category = FIO_OPT_C_GENERAL,
3413 .group = FIO_OPT_G_CRED,
3417 .lname = "Group ID",
3418 .type = FIO_OPT_INT,
3419 .off1 = td_var_offset(gid),
3420 .help = "Run job with this group ID",
3421 .category = FIO_OPT_C_GENERAL,
3422 .group = FIO_OPT_G_CRED,
3427 .type = FIO_OPT_INT,
3428 .off1 = td_var_offset(kb_base),
3434 .help = "Use 1024 as the K base",
3438 .help = "Use 1000 as the K base",
3441 .help = "How many bytes per KB for reporting (1000 or 1024)",
3442 .category = FIO_OPT_C_GENERAL,
3443 .group = FIO_OPT_G_INVALID,
3446 .name = "unit_base",
3447 .lname = "Base unit for reporting (Bits or Bytes)",
3448 .type = FIO_OPT_INT,
3449 .off1 = td_var_offset(unit_base),
3454 .help = "Auto-detect",
3458 .help = "Normal (byte based)",
3462 .help = "Bit based",
3465 .help = "Bit multiple of result summary data (8 for byte, 1 for bit)",
3466 .category = FIO_OPT_C_GENERAL,
3467 .group = FIO_OPT_G_INVALID,
3470 .name = "hugepage-size",
3471 .lname = "Hugepage size",
3472 .type = FIO_OPT_INT,
3473 .off1 = td_var_offset(hugepage_size),
3474 .help = "When using hugepages, specify size of each page",
3475 .def = __fio_stringify(FIO_HUGE_PAGE),
3476 .interval = 1024 * 1024,
3477 .category = FIO_OPT_C_GENERAL,
3478 .group = FIO_OPT_G_INVALID,
3482 .lname = "I/O flow ID",
3483 .type = FIO_OPT_INT,
3484 .off1 = td_var_offset(flow_id),
3485 .help = "The flow index ID to use",
3487 .category = FIO_OPT_C_IO,
3488 .group = FIO_OPT_G_IO_FLOW,
3492 .lname = "I/O flow weight",
3493 .type = FIO_OPT_INT,
3494 .off1 = td_var_offset(flow),
3495 .help = "Weight for flow control of this job",
3496 .parent = "flow_id",
3499 .category = FIO_OPT_C_IO,
3500 .group = FIO_OPT_G_IO_FLOW,
3503 .name = "flow_watermark",
3504 .lname = "I/O flow watermark",
3505 .type = FIO_OPT_INT,
3506 .off1 = td_var_offset(flow_watermark),
3507 .help = "High watermark for flow control. This option"
3508 " should be set to the same value for all threads"
3509 " with non-zero flow.",
3510 .parent = "flow_id",
3513 .category = FIO_OPT_C_IO,
3514 .group = FIO_OPT_G_IO_FLOW,
3517 .name = "flow_sleep",
3518 .lname = "I/O flow sleep",
3519 .type = FIO_OPT_INT,
3520 .off1 = td_var_offset(flow_sleep),
3521 .help = "How many microseconds to sleep after being held"
3522 " back by the flow control mechanism",
3523 .parent = "flow_id",
3526 .category = FIO_OPT_C_IO,
3527 .group = FIO_OPT_G_IO_FLOW,
3534 static void add_to_lopt(struct option *lopt, struct fio_option *o,
3535 const char *name, int val)
3537 lopt->name = (char *) name;
3539 if (o->type == FIO_OPT_STR_SET)
3540 lopt->has_arg = optional_argument;
3542 lopt->has_arg = required_argument;
3545 static void options_to_lopts(struct fio_option *opts,
3546 struct option *long_options,
3547 int i, int option_type)
3549 struct fio_option *o = &opts[0];
3551 add_to_lopt(&long_options[i], o, o->name, option_type);
3554 add_to_lopt(&long_options[i], o, o->alias, option_type);
3559 assert(i < FIO_NR_OPTIONS);
3563 void fio_options_set_ioengine_opts(struct option *long_options,
3564 struct thread_data *td)
3569 while (long_options[i].name) {
3570 if (long_options[i].val == FIO_GETOPT_IOENGINE) {
3571 memset(&long_options[i], 0, sizeof(*long_options));
3578 * Just clear out the prior ioengine options.
3583 options_to_lopts(td->io_ops->options, long_options, i,
3584 FIO_GETOPT_IOENGINE);
3587 void fio_options_dup_and_init(struct option *long_options)
3591 options_init(fio_options);
3594 while (long_options[i].name)
3597 options_to_lopts(fio_options, long_options, i, FIO_GETOPT_JOB);
3600 struct fio_keyword {
3606 static struct fio_keyword fio_keywords[] = {
3608 .word = "$pagesize",
3609 .desc = "Page size in the system",
3612 .word = "$mb_memory",
3613 .desc = "Megabytes of memory online",
3617 .desc = "Number of CPUs online in the system",
3624 void fio_keywords_init(void)
3626 unsigned long long mb_memory;
3630 sprintf(buf, "%lu", (unsigned long) page_size);
3631 fio_keywords[0].replace = strdup(buf);
3633 mb_memory = os_phys_mem() / (1024 * 1024);
3634 sprintf(buf, "%llu", mb_memory);
3635 fio_keywords[1].replace = strdup(buf);
3638 sprintf(buf, "%lu", l);
3639 fio_keywords[2].replace = strdup(buf);
3644 static char *bc_calc(char *str)
3646 char buf[128], *tmp;
3651 * No math, just return string
3653 if ((!strchr(str, '+') && !strchr(str, '-') && !strchr(str, '*') &&
3654 !strchr(str, '/')) || strchr(str, '\''))
3658 * Split option from value, we only need to calculate the value
3660 tmp = strchr(str, '=');
3667 * Prevent buffer overflows; such a case isn't reasonable anyway
3669 if (strlen(str) >= 128 || strlen(tmp) > 100)
3672 sprintf(buf, "which %s > /dev/null", BC_APP);
3674 log_err("fio: bc is needed for performing math\n");
3678 sprintf(buf, "echo '%s' | %s", tmp, BC_APP);
3679 f = popen(buf, "r");
3683 ret = fread(&buf[tmp - str], 1, 128 - (tmp - str), f);
3690 buf[(tmp - str) + ret - 1] = '\0';
3691 memcpy(buf, str, tmp - str);
3697 * Return a copy of the input string with substrings of the form ${VARNAME}
3698 * substituted with the value of the environment variable VARNAME. The
3699 * substitution always occurs, even if VARNAME is empty or the corresponding
3700 * environment variable undefined.
3702 static char *option_dup_subs(const char *opt)
3704 char out[OPT_LEN_MAX+1];
3705 char in[OPT_LEN_MAX+1];
3708 char *ch1, *ch2, *env;
3709 ssize_t nchr = OPT_LEN_MAX;
3712 if (strlen(opt) + 1 > OPT_LEN_MAX) {
3713 log_err("OPT_LEN_MAX (%d) is too small\n", OPT_LEN_MAX);
3717 in[OPT_LEN_MAX] = '\0';
3718 strncpy(in, opt, OPT_LEN_MAX);
3720 while (*inptr && nchr > 0) {
3721 if (inptr[0] == '$' && inptr[1] == '{') {
3722 ch2 = strchr(inptr, '}');
3723 if (ch2 && inptr+1 < ch2) {
3730 envlen = strlen(env);
3731 if (envlen <= nchr) {
3732 memcpy(outptr, env, envlen);
3742 *outptr++ = *inptr++;
3751 * Look for reserved variable names and replace them with real values
3753 static char *fio_keyword_replace(char *opt)
3759 for (i = 0; fio_keywords[i].word != NULL; i++) {
3760 struct fio_keyword *kw = &fio_keywords[i];
3762 while ((s = strstr(opt, kw->word)) != NULL) {
3763 char *new = malloc(strlen(opt) + 1);
3769 * Copy part of the string before the keyword and
3770 * sprintf() the replacement after it.
3772 memcpy(new, opt, olen);
3773 len = sprintf(new + olen, "%s", kw->replace);
3776 * If there's more in the original string, copy that
3779 opt += strlen(kw->word) + olen;
3781 memcpy(new + olen + len, opt, opt - o_org - 1);
3784 * replace opt and free the old opt
3794 * Check for potential math and invoke bc, if possible
3802 static char **dup_and_sub_options(char **opts, int num_opts)
3805 char **opts_copy = malloc(num_opts * sizeof(*opts));
3806 for (i = 0; i < num_opts; i++) {
3807 opts_copy[i] = option_dup_subs(opts[i]);
3810 opts_copy[i] = fio_keyword_replace(opts_copy[i]);
3815 int fio_options_parse(struct thread_data *td, char **opts, int num_opts,
3818 int i, ret, unknown;
3821 sort_options(opts, fio_options, num_opts);
3822 opts_copy = dup_and_sub_options(opts, num_opts);
3824 for (ret = 0, i = 0, unknown = 0; i < num_opts; i++) {
3825 struct fio_option *o;
3826 int newret = parse_option(opts_copy[i], opts[i], fio_options,
3827 &o, td, dump_cmdline);
3835 opts_copy[i] = NULL;
3842 ret |= ioengine_load(td);
3844 sort_options(opts_copy, td->io_ops->options, num_opts);
3847 for (i = 0; i < num_opts; i++) {
3848 struct fio_option *o = NULL;
3854 newret = parse_option(opts_copy[i], opts[i],
3855 td->io_ops->options, &o,
3856 td->eo, dump_cmdline);
3860 log_err("Bad option <%s>\n", opts[i]);
3863 opts_copy[i] = NULL;
3871 int fio_cmd_option_parse(struct thread_data *td, const char *opt, char *val)
3873 return parse_cmd_option(opt, val, fio_options, td);
3876 int fio_cmd_ioengine_option_parse(struct thread_data *td, const char *opt,
3879 return parse_cmd_option(opt, val, td->io_ops->options, td->eo);
3882 void fio_fill_default_options(struct thread_data *td)
3884 td->o.magic = OPT_MAGIC;
3885 fill_default_options(td, fio_options);
3888 int fio_show_option_help(const char *opt)
3890 return show_cmd_help(fio_options, opt);
3893 void options_mem_dupe(void *data, struct fio_option *options)
3895 struct fio_option *o;
3898 for (o = &options[0]; o->name; o++) {
3899 if (o->type != FIO_OPT_STR_STORE)
3902 ptr = td_var(data, o, o->off1);
3904 *ptr = strdup(*ptr);
3909 * dupe FIO_OPT_STR_STORE options
3911 void fio_options_mem_dupe(struct thread_data *td)
3913 options_mem_dupe(&td->o, fio_options);
3915 if (td->eo && td->io_ops) {
3916 void *oldeo = td->eo;
3918 td->eo = malloc(td->io_ops->option_struct_size);
3919 memcpy(td->eo, oldeo, td->io_ops->option_struct_size);
3920 options_mem_dupe(td->eo, td->io_ops->options);
3924 unsigned int fio_get_kb_base(void *data)
3926 struct thread_options *o = data;
3927 unsigned int kb_base = 0;
3930 * This is a hack... For private options, *data is not holding
3931 * a pointer to the thread_options, but to private data. This means
3932 * we can't safely dereference it, but magic is first so mem wise
3933 * it is valid. But this also means that if the job first sets
3934 * kb_base and expects that to be honored by private options,
3935 * it will be disappointed. We will return the global default
3938 if (o && o->magic == OPT_MAGIC)
3939 kb_base = o->kb_base;
3946 int add_option(struct fio_option *o)
3948 struct fio_option *__o;
3957 if (opt_index + 1 == FIO_MAX_OPTS) {
3958 log_err("fio: FIO_MAX_OPTS is too small\n");
3962 memcpy(&fio_options[opt_index], o, sizeof(*o));
3963 fio_options[opt_index + 1].name = NULL;
3967 void invalidate_profile_options(const char *prof_name)
3969 struct fio_option *o;
3973 if (o->prof_name && !strcmp(o->prof_name, prof_name)) {
3974 o->type = FIO_OPT_INVALID;
3975 o->prof_name = NULL;
3981 void add_opt_posval(const char *optname, const char *ival, const char *help)
3983 struct fio_option *o;
3986 o = find_option(fio_options, optname);
3990 for (i = 0; i < PARSE_MAX_VP; i++) {
3991 if (o->posval[i].ival)
3994 o->posval[i].ival = ival;
3995 o->posval[i].help = help;
4000 void del_opt_posval(const char *optname, const char *ival)
4002 struct fio_option *o;
4005 o = find_option(fio_options, optname);
4009 for (i = 0; i < PARSE_MAX_VP; i++) {
4010 if (!o->posval[i].ival)
4012 if (strcmp(o->posval[i].ival, ival))
4015 o->posval[i].ival = NULL;
4016 o->posval[i].help = NULL;
4020 void fio_options_free(struct thread_data *td)
4022 options_free(fio_options, td);
4023 if (td->eo && td->io_ops && td->io_ops->options) {
4024 options_free(td->io_ops->options, td->eo);
4030 struct fio_option *fio_option_find(const char *name)
4032 return find_option(fio_options, name);