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, 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 == -1U)
136 if (perc > 100 && perc_missing > 1) {
137 log_err("fio: bssplit percentages add to more than 100%%\n");
143 * If values didn't have a percentage set, divide the remains between
147 if (perc_missing == 1 && o->bssplit_nr[ddir] == 1)
149 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
150 struct bssplit *bsp = &bssplit[i];
152 if (bsp->perc == -1U)
153 bsp->perc = (100 - perc) / perc_missing;
157 o->min_bs[ddir] = min_bs;
158 o->max_bs[ddir] = max_bs;
161 * now sort based on percentages, for ease of lookup
163 qsort(bssplit, o->bssplit_nr[ddir], sizeof(struct bssplit), bs_cmp);
164 o->bssplit[ddir] = bssplit;
168 static int str_bssplit_cb(void *data, const char *input)
170 struct thread_data *td = data;
171 char *str, *p, *odir, *ddir;
177 p = str = strdup(input);
179 strip_blank_front(&str);
180 strip_blank_end(str);
182 odir = strchr(str, ',');
184 ddir = strchr(odir + 1, ',');
186 ret = bssplit_ddir(&td->o, DDIR_TRIM, ddir + 1);
192 op = strdup(odir + 1);
193 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
198 ret = bssplit_ddir(&td->o, DDIR_WRITE, odir + 1);
201 ret = bssplit_ddir(&td->o, DDIR_READ, str);
207 ret = bssplit_ddir(&td->o, DDIR_WRITE, op);
212 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
215 ret = bssplit_ddir(&td->o, DDIR_READ, str);
222 static int str2error(char *str)
224 const char *err[] = { "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO",
225 "ENXIO", "E2BIG", "ENOEXEC", "EBADF",
226 "ECHILD", "EAGAIN", "ENOMEM", "EACCES",
227 "EFAULT", "ENOTBLK", "EBUSY", "EEXIST",
228 "EXDEV", "ENODEV", "ENOTDIR", "EISDIR",
229 "EINVAL", "ENFILE", "EMFILE", "ENOTTY",
230 "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE",
231 "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" };
232 int i = 0, num = sizeof(err) / sizeof(void *);
235 if (!strcmp(err[i], str))
242 static int ignore_error_type(struct thread_data *td, int etype, char *str)
248 if (etype >= ERROR_TYPE_CNT) {
249 log_err("Illegal error type\n");
253 td->o.ignore_error_nr[etype] = 4;
254 error = malloc(4 * sizeof(struct bssplit));
257 while ((fname = strsep(&str, ":")) != NULL) {
263 * grow struct buffer, if needed
265 if (i == td->o.ignore_error_nr[etype]) {
266 td->o.ignore_error_nr[etype] <<= 1;
267 error = realloc(error, td->o.ignore_error_nr[etype]
270 if (fname[0] == 'E') {
271 error[i] = str2error(fname);
273 error[i] = atoi(fname);
275 error[i] = -error[i];
278 log_err("Unknown error %s, please use number value \n",
286 td->o.continue_on_error |= 1 << etype;
287 td->o.ignore_error_nr[etype] = i;
288 td->o.ignore_error[etype] = error;
296 static int str_ignore_error_cb(void *data, const char *input)
298 struct thread_data *td = data;
300 int type = 0, ret = 1;
305 p = str = strdup(input);
307 strip_blank_front(&str);
308 strip_blank_end(str);
314 ret = ignore_error_type(td, type, p);
324 static int str_rw_cb(void *data, const char *str)
326 struct thread_data *td = data;
327 struct thread_options *o = &td->o;
336 nr = get_opt_postfix(str);
341 o->ddir_seq_nr = atoi(nr);
345 if (str_to_decimal(nr, &val, 1, o, 0, 0)) {
346 log_err("fio: rw postfix parsing failed\n");
351 o->ddir_seq_add = val;
358 static int str_mem_cb(void *data, const char *mem)
360 struct thread_data *td = data;
362 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
363 td->o.mmapfile = get_opt_postfix(mem);
368 static int fio_clock_source_cb(void *data, const char *str)
370 struct thread_data *td = data;
372 fio_clock_source = td->o.clocksource;
373 fio_clock_source_set = 1;
378 static int str_rwmix_read_cb(void *data, unsigned long long *val)
380 struct thread_data *td = data;
382 td->o.rwmix[DDIR_READ] = *val;
383 td->o.rwmix[DDIR_WRITE] = 100 - *val;
387 static int str_rwmix_write_cb(void *data, unsigned long long *val)
389 struct thread_data *td = data;
391 td->o.rwmix[DDIR_WRITE] = *val;
392 td->o.rwmix[DDIR_READ] = 100 - *val;
396 static int str_exitall_cb(void)
398 exitall_on_terminate = 1;
402 #ifdef FIO_HAVE_CPU_AFFINITY
403 int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
405 unsigned int i, index, cpus_in_mask;
406 const long max_cpu = cpus_online();
408 cpus_in_mask = fio_cpu_count(mask);
409 cpu_index = cpu_index % cpus_in_mask;
412 for (i = 0; i < max_cpu; i++) {
413 if (!fio_cpu_isset(mask, i))
416 if (cpu_index != index)
417 fio_cpu_clear(mask, i);
422 return fio_cpu_count(mask);
425 static int str_cpumask_cb(void *data, unsigned long long *val)
427 struct thread_data *td = data;
435 ret = fio_cpuset_init(&td->o.cpumask);
437 log_err("fio: cpuset_init failed\n");
438 td_verror(td, ret, "fio_cpuset_init");
442 max_cpu = cpus_online();
444 for (i = 0; i < sizeof(int) * 8; i++) {
445 if ((1 << i) & *val) {
447 log_err("fio: CPU %d too large (max=%ld)\n", i,
451 dprint(FD_PARSE, "set cpu allowed %d\n", i);
452 fio_cpu_set(&td->o.cpumask, i);
456 td->o.cpumask_set = 1;
460 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
467 ret = fio_cpuset_init(mask);
469 log_err("fio: cpuset_init failed\n");
470 td_verror(td, ret, "fio_cpuset_init");
474 p = str = strdup(input);
476 strip_blank_front(&str);
477 strip_blank_end(str);
479 max_cpu = cpus_online();
481 while ((cpu = strsep(&str, ",")) != NULL) {
490 while ((cpu2 = strsep(&str2, "-")) != NULL) {
500 while (icpu <= icpu2) {
501 if (icpu >= FIO_MAX_CPUS) {
502 log_err("fio: your OS only supports up to"
503 " %d CPUs\n", (int) FIO_MAX_CPUS);
507 if (icpu > max_cpu) {
508 log_err("fio: CPU %d too large (max=%ld)\n",
514 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
515 fio_cpu_set(mask, icpu);
524 td->o.cpumask_set = 1;
528 static int str_cpus_allowed_cb(void *data, const char *input)
530 struct thread_data *td = data;
536 ret = set_cpus_allowed(td, &td->o.cpumask, input);
538 td->o.cpumask_set = 1;
543 static int str_verify_cpus_allowed_cb(void *data, const char *input)
545 struct thread_data *td = data;
548 ret = set_cpus_allowed(td, &td->o.verify_cpumask, input);
550 td->o.verify_cpumask_set = 1;
556 #ifdef CONFIG_LIBNUMA
557 static int str_numa_cpunodes_cb(void *data, char *input)
559 struct thread_data *td = data;
560 struct bitmask *verify_bitmask;
565 /* numa_parse_nodestring() parses a character string list
566 * of nodes into a bit mask. The bit mask is allocated by
567 * numa_allocate_nodemask(), so it should be freed by
568 * numa_free_nodemask().
570 verify_bitmask = numa_parse_nodestring(input);
571 if (verify_bitmask == NULL) {
572 log_err("fio: numa_parse_nodestring failed\n");
573 td_verror(td, 1, "str_numa_cpunodes_cb");
576 numa_free_nodemask(verify_bitmask);
578 td->o.numa_cpunodes = strdup(input);
579 td->o.numa_cpumask_set = 1;
583 static int str_numa_mpol_cb(void *data, char *input)
585 struct thread_data *td = data;
586 const char * const policy_types[] =
587 { "default", "prefer", "bind", "interleave", "local", NULL };
590 struct bitmask *verify_bitmask;
595 nodelist = strchr(input, ':');
597 /* NUL-terminate mode */
601 for (i = 0; i <= MPOL_LOCAL; i++) {
602 if (!strcmp(input, policy_types[i])) {
603 td->o.numa_mem_mode = i;
607 if (i > MPOL_LOCAL) {
608 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
612 switch (td->o.numa_mem_mode) {
615 * Insist on a nodelist of one node only
618 char *rest = nodelist;
619 while (isdigit(*rest))
622 log_err("fio: one node only for \'prefer\'\n");
626 log_err("fio: one node is needed for \'prefer\'\n");
630 case MPOL_INTERLEAVE:
632 * Default to online nodes with memory if no nodelist
635 nodelist = strdup("all");
640 * Don't allow a nodelist
643 log_err("fio: NO nodelist for \'local\'\n");
649 * Insist on a nodelist
652 log_err("fio: a nodelist is needed for \'bind\'\n");
659 /* numa_parse_nodestring() parses a character string list
660 * of nodes into a bit mask. The bit mask is allocated by
661 * numa_allocate_nodemask(), so it should be freed by
662 * numa_free_nodemask().
664 switch (td->o.numa_mem_mode) {
666 td->o.numa_mem_prefer_node = atoi(nodelist);
668 case MPOL_INTERLEAVE:
670 verify_bitmask = numa_parse_nodestring(nodelist);
671 if (verify_bitmask == NULL) {
672 log_err("fio: numa_parse_nodestring failed\n");
673 td_verror(td, 1, "str_numa_memnodes_cb");
676 td->o.numa_memnodes = strdup(nodelist);
677 numa_free_nodemask(verify_bitmask);
686 td->o.numa_memmask_set = 1;
694 static int str_fst_cb(void *data, const char *str)
696 struct thread_data *td = data;
697 char *nr = get_opt_postfix(str);
699 td->file_service_nr = 1;
701 td->file_service_nr = atoi(nr);
708 #ifdef CONFIG_SYNC_FILE_RANGE
709 static int str_sfr_cb(void *data, const char *str)
711 struct thread_data *td = data;
712 char *nr = get_opt_postfix(str);
714 td->sync_file_range_nr = 1;
716 td->sync_file_range_nr = atoi(nr);
724 static int str_random_distribution_cb(void *data, const char *str)
726 struct thread_data *td = data;
733 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
735 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
740 nr = get_opt_postfix(str);
741 if (nr && !str_to_float(nr, &val, 0)) {
742 log_err("fio: random postfix parsing failed\n");
749 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
751 log_err("fio: zipf theta must different than 1.0\n");
754 td->o.zipf_theta.u.f = val;
756 if (val <= 0.00 || val >= 1.00) {
757 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
760 td->o.pareto_h.u.f = val;
767 * Return next name in the string. Files are separated with ':'. If the ':'
768 * is escaped with a '\', then that ':' is part of the filename and does not
769 * indicate a new file.
771 static char *get_next_name(char **ptr)
776 if (!str || !strlen(str))
782 * No colon, we are done
784 p = strchr(str, ':');
791 * We got a colon, but it's the first character. Skip and
799 if (*(p - 1) != '\\') {
805 memmove(p - 1, p, strlen(p) + 1);
813 static int get_max_name_idx(char *input)
815 unsigned int cur_idx;
818 p = str = strdup(input);
819 for (cur_idx = 0; ; cur_idx++)
820 if (get_next_name(&str) == NULL)
828 * Returns the directory at the index, indexes > entires will be
829 * assigned via modulo division of the index
831 int set_name_idx(char *target, char *input, int index)
833 unsigned int cur_idx;
835 char *fname, *str, *p;
837 p = str = strdup(input);
839 index %= get_max_name_idx(input);
840 for (cur_idx = 0; cur_idx <= index; cur_idx++)
841 fname = get_next_name(&str);
843 len = sprintf(target, "%s/", fname);
849 static int str_filename_cb(void *data, const char *input)
851 struct thread_data *td = data;
852 char *fname, *str, *p;
854 p = str = strdup(input);
856 strip_blank_front(&str);
857 strip_blank_end(str);
859 if (!td->files_index)
862 while ((fname = get_next_name(&str)) != NULL) {
865 add_file(td, fname, 0, 1);
872 static int str_directory_cb(void *data, const char fio_unused *unused)
874 struct thread_data *td = data;
876 char *dirname, *str, *p;
882 p = str = strdup(td->o.directory);
883 while ((dirname = get_next_name(&str)) != NULL) {
884 if (lstat(dirname, &sb) < 0) {
887 log_err("fio: %s is not a directory\n", dirname);
888 td_verror(td, ret, "lstat");
891 if (!S_ISDIR(sb.st_mode)) {
892 log_err("fio: %s is not a directory\n", dirname);
903 static int str_lockfile_cb(void *data, const char fio_unused *str)
905 struct thread_data *td = data;
907 if (td->files_index) {
908 log_err("fio: lockfile= option must precede filename=\n");
915 static int str_opendir_cb(void *data, const char fio_unused *str)
917 struct thread_data *td = data;
922 if (!td->files_index)
925 return add_dir_files(td, td->o.opendir);
928 static int pattern_cb(char *pattern, unsigned int max_size,
929 const char *input, unsigned int *pattern_bytes)
932 int i = 0, j = 0, len, k, base = 10;
933 uint32_t pattern_length;
937 * Check if it's a string input
939 loc1 = strchr(input, '\"');
943 if (*loc1 == '\0' || *loc1 == '\"')
948 } while (i < max_size);
957 * No string, find out if it's decimal or hexidecimal
959 loc1 = strstr(input, "0x");
960 loc2 = strstr(input, "0X");
963 off = strtol(input, NULL, base);
964 if (off != LONG_MAX || errno != ERANGE) {
966 pattern[i] = off & 0xff;
975 j = loc1 - input + 2;
977 j = loc2 - input + 2;
980 if (len - j < max_size * 2) {
982 off = converthexchartoint(input[k--]);
984 off += (converthexchartoint(input[k--])
986 pattern[i++] = (char) off;
992 * Fill the pattern all the way to the end. This greatly reduces
993 * the number of memcpy's we have to do when verifying the IO.
997 while (i > 1 && i * 2 <= max_size) {
998 memcpy(&pattern[i], &pattern[0], i);
1003 * Fill remainder, if the pattern multiple ends up not being
1006 while (i > 1 && i < max_size) {
1007 unsigned int b = min(pattern_length, max_size - i);
1009 memcpy(&pattern[i], &pattern[0], b);
1015 * The code in verify_io_u_pattern assumes a single byte
1016 * pattern fills the whole verify pattern buffer.
1018 memset(pattern, pattern[0], max_size);
1025 static int str_buffer_pattern_cb(void *data, const char *input)
1027 struct thread_data *td = data;
1030 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
1031 &td->o.buffer_pattern_bytes);
1033 if (!ret && td->o.buffer_pattern_bytes) {
1034 if (!td->o.compress_percentage)
1035 td->o.refill_buffers = 0;
1036 td->o.scramble_buffers = 0;
1037 td->o.zero_buffers = 0;
1039 log_err("fio: failed parsing pattern `%s`\n", input);
1046 static int str_buffer_compress_cb(void *data, unsigned long long *il)
1048 struct thread_data *td = data;
1050 td->flags |= TD_F_COMPRESS;
1051 td->o.compress_percentage = *il;
1055 static int str_dedupe_cb(void *data, unsigned long long *il)
1057 struct thread_data *td = data;
1059 td->flags |= TD_F_COMPRESS;
1060 td->o.dedupe_percentage = *il;
1061 td->o.refill_buffers = 1;
1065 static int str_verify_pattern_cb(void *data, const char *input)
1067 struct thread_data *td = data;
1070 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
1071 &td->o.verify_pattern_bytes);
1074 * VERIFY_META could already be set
1076 if (!ret && td->o.verify == VERIFY_NONE)
1077 td->o.verify = VERIFY_PATTERN;
1082 static int str_gtod_reduce_cb(void *data, int *il)
1084 struct thread_data *td = data;
1087 td->o.disable_lat = !!val;
1088 td->o.disable_clat = !!val;
1089 td->o.disable_slat = !!val;
1090 td->o.disable_bw = !!val;
1091 td->o.clat_percentiles = !val;
1093 td->tv_cache_mask = 63;
1098 static int str_gtod_cpu_cb(void *data, long long *il)
1100 struct thread_data *td = data;
1103 td->o.gtod_cpu = val;
1104 td->o.gtod_offload = 1;
1108 static int str_size_cb(void *data, unsigned long long *__val)
1110 struct thread_data *td = data;
1111 unsigned long long v = *__val;
1113 if (parse_is_percent(v)) {
1115 td->o.size_percent = -1ULL - v;
1122 static int rw_verify(struct fio_option *o, void *data)
1124 struct thread_data *td = data;
1126 if (read_only && td_write(td)) {
1127 log_err("fio: job <%s> has write bit set, but fio is in"
1128 " read-only mode\n", td->o.name);
1135 static int gtod_cpu_verify(struct fio_option *o, void *data)
1137 #ifndef FIO_HAVE_CPU_AFFINITY
1138 struct thread_data *td = data;
1140 if (td->o.gtod_cpu) {
1141 log_err("fio: platform must support CPU affinity for"
1142 "gettimeofday() offloading\n");
1153 static struct opt_group fio_opt_groups[] = {
1156 .mask = FIO_OPT_C_GENERAL,
1160 .mask = FIO_OPT_C_IO,
1164 .mask = FIO_OPT_C_FILE,
1167 .name = "Statistics",
1168 .mask = FIO_OPT_C_STAT,
1172 .mask = FIO_OPT_C_LOG,
1176 .mask = FIO_OPT_C_PROFILE,
1183 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1184 unsigned int inv_mask)
1186 struct opt_group *og;
1189 if (*mask == inv_mask || !*mask)
1192 for (i = 0; ogs[i].name; i++) {
1195 if (*mask & og->mask) {
1196 *mask &= ~(og->mask);
1204 struct opt_group *opt_group_from_mask(unsigned int *mask)
1206 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1209 static struct opt_group fio_opt_cat_groups[] = {
1211 .name = "Latency profiling",
1212 .mask = FIO_OPT_G_LATPROF,
1216 .mask = FIO_OPT_G_RATE,
1220 .mask = FIO_OPT_G_ZONE,
1223 .name = "Read/write mix",
1224 .mask = FIO_OPT_G_RWMIX,
1228 .mask = FIO_OPT_G_VERIFY,
1232 .mask = FIO_OPT_G_TRIM,
1235 .name = "I/O Logging",
1236 .mask = FIO_OPT_G_IOLOG,
1239 .name = "I/O Depth",
1240 .mask = FIO_OPT_G_IO_DEPTH,
1244 .mask = FIO_OPT_G_IO_FLOW,
1247 .name = "Description",
1248 .mask = FIO_OPT_G_DESC,
1252 .mask = FIO_OPT_G_FILENAME,
1255 .name = "General I/O",
1256 .mask = FIO_OPT_G_IO_BASIC,
1260 .mask = FIO_OPT_G_CGROUP,
1264 .mask = FIO_OPT_G_RUNTIME,
1268 .mask = FIO_OPT_G_PROCESS,
1271 .name = "Job credentials / priority",
1272 .mask = FIO_OPT_G_CRED,
1275 .name = "Clock settings",
1276 .mask = FIO_OPT_G_CLOCK,
1280 .mask = FIO_OPT_G_IO_TYPE,
1283 .name = "I/O Thinktime",
1284 .mask = FIO_OPT_G_THINKTIME,
1287 .name = "Randomizations",
1288 .mask = FIO_OPT_G_RANDOM,
1291 .name = "I/O buffers",
1292 .mask = FIO_OPT_G_IO_BUF,
1295 .name = "Tiobench profile",
1296 .mask = FIO_OPT_G_TIOBENCH,
1304 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1306 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1310 * Map of job/command line options
1312 struct fio_option fio_options[FIO_MAX_OPTS] = {
1314 .name = "description",
1315 .lname = "Description of job",
1316 .type = FIO_OPT_STR_STORE,
1317 .off1 = td_var_offset(description),
1318 .help = "Text job description",
1319 .category = FIO_OPT_C_GENERAL,
1320 .group = FIO_OPT_G_DESC,
1324 .lname = "Job name",
1325 .type = FIO_OPT_STR_STORE,
1326 .off1 = td_var_offset(name),
1327 .help = "Name of this job",
1328 .category = FIO_OPT_C_GENERAL,
1329 .group = FIO_OPT_G_DESC,
1333 .lname = "Filename(s)",
1334 .type = FIO_OPT_STR_STORE,
1335 .off1 = td_var_offset(filename),
1336 .cb = str_filename_cb,
1337 .prio = -1, /* must come after "directory" */
1338 .help = "File(s) to use for the workload",
1339 .category = FIO_OPT_C_FILE,
1340 .group = FIO_OPT_G_FILENAME,
1343 .name = "directory",
1344 .lname = "Directory",
1345 .type = FIO_OPT_STR_STORE,
1346 .off1 = td_var_offset(directory),
1347 .cb = str_directory_cb,
1348 .help = "Directory to store files in",
1349 .category = FIO_OPT_C_FILE,
1350 .group = FIO_OPT_G_FILENAME,
1353 .name = "filename_format",
1354 .type = FIO_OPT_STR_STORE,
1355 .off1 = td_var_offset(filename_format),
1356 .prio = -1, /* must come after "directory" */
1357 .help = "Override default $jobname.$jobnum.$filenum naming",
1358 .def = "$jobname.$jobnum.$filenum",
1359 .category = FIO_OPT_C_FILE,
1360 .group = FIO_OPT_G_FILENAME,
1364 .lname = "Lockfile",
1365 .type = FIO_OPT_STR,
1366 .off1 = td_var_offset(file_lock_mode),
1367 .help = "Lock file when doing IO to it",
1369 .parent = "filename",
1372 .cb = str_lockfile_cb,
1373 .category = FIO_OPT_C_FILE,
1374 .group = FIO_OPT_G_FILENAME,
1377 .oval = FILE_LOCK_NONE,
1378 .help = "No file locking",
1380 { .ival = "exclusive",
1381 .oval = FILE_LOCK_EXCLUSIVE,
1382 .help = "Exclusive file lock",
1385 .ival = "readwrite",
1386 .oval = FILE_LOCK_READWRITE,
1387 .help = "Read vs write lock",
1393 .lname = "Open directory",
1394 .type = FIO_OPT_STR_STORE,
1395 .off1 = td_var_offset(opendir),
1396 .cb = str_opendir_cb,
1397 .help = "Recursively add files from this directory and down",
1398 .category = FIO_OPT_C_FILE,
1399 .group = FIO_OPT_G_FILENAME,
1403 .lname = "Read/write",
1404 .alias = "readwrite",
1405 .type = FIO_OPT_STR,
1407 .off1 = td_var_offset(td_ddir),
1408 .help = "IO direction",
1410 .verify = rw_verify,
1411 .category = FIO_OPT_C_IO,
1412 .group = FIO_OPT_G_IO_BASIC,
1415 .oval = TD_DDIR_READ,
1416 .help = "Sequential read",
1419 .oval = TD_DDIR_WRITE,
1420 .help = "Sequential write",
1423 .oval = TD_DDIR_TRIM,
1424 .help = "Sequential trim",
1426 { .ival = "randread",
1427 .oval = TD_DDIR_RANDREAD,
1428 .help = "Random read",
1430 { .ival = "randwrite",
1431 .oval = TD_DDIR_RANDWRITE,
1432 .help = "Random write",
1434 { .ival = "randtrim",
1435 .oval = TD_DDIR_RANDTRIM,
1436 .help = "Random trim",
1440 .help = "Sequential read and write mix",
1442 { .ival = "readwrite",
1444 .help = "Sequential read and write mix",
1447 .oval = TD_DDIR_RANDRW,
1448 .help = "Random read and write mix"
1453 .name = "rw_sequencer",
1454 .lname = "RW Sequencer",
1455 .type = FIO_OPT_STR,
1456 .off1 = td_var_offset(rw_seq),
1457 .help = "IO offset generator modifier",
1458 .def = "sequential",
1459 .category = FIO_OPT_C_IO,
1460 .group = FIO_OPT_G_IO_BASIC,
1462 { .ival = "sequential",
1464 .help = "Generate sequential offsets",
1466 { .ival = "identical",
1467 .oval = RW_SEQ_IDENT,
1468 .help = "Generate identical offsets",
1475 .lname = "IO Engine",
1476 .type = FIO_OPT_STR_STORE,
1477 .off1 = td_var_offset(ioengine),
1478 .help = "IO engine to use",
1479 .def = FIO_PREFERRED_ENGINE,
1480 .category = FIO_OPT_C_IO,
1481 .group = FIO_OPT_G_IO_BASIC,
1484 .help = "Use read/write",
1487 .help = "Use pread/pwrite",
1490 .help = "Use readv/writev",
1492 #ifdef CONFIG_PWRITEV
1494 .help = "Use preadv/pwritev",
1497 #ifdef CONFIG_LIBAIO
1499 .help = "Linux native asynchronous IO",
1502 #ifdef CONFIG_POSIXAIO
1503 { .ival = "posixaio",
1504 .help = "POSIX asynchronous IO",
1507 #ifdef CONFIG_SOLARISAIO
1508 { .ival = "solarisaio",
1509 .help = "Solaris native asynchronous IO",
1512 #ifdef CONFIG_WINDOWSAIO
1513 { .ival = "windowsaio",
1514 .help = "Windows native asynchronous IO"
1519 .help = "Rados Block Device asynchronous IO"
1523 .help = "Memory mapped IO"
1525 #ifdef CONFIG_LINUX_SPLICE
1527 .help = "splice/vmsplice based IO",
1529 { .ival = "netsplice",
1530 .help = "splice/vmsplice to/from the network",
1533 #ifdef FIO_HAVE_SGIO
1535 .help = "SCSI generic v3 IO",
1539 .help = "Testing engine (no data transfer)",
1542 .help = "Network IO",
1545 .help = "CPU cycle burner engine",
1549 .help = "GUASI IO engine",
1552 #ifdef FIO_HAVE_BINJECT
1553 { .ival = "binject",
1554 .help = "binject direct inject block engine",
1559 .help = "RDMA IO engine",
1562 #ifdef CONFIG_FUSION_AW
1563 { .ival = "fusion-aw-sync",
1564 .help = "Fusion-io atomic write engine",
1567 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1568 { .ival = "e4defrag",
1569 .help = "ext4 defrag engine",
1572 #ifdef CONFIG_LINUX_FALLOCATE
1574 .help = "fallocate() file based engine",
1579 .help = "Glusterfs libgfapi(sync) based engine"
1581 { .ival = "gfapi_async",
1582 .help = "Glusterfs libgfapi(async) based engine"
1585 #ifdef CONFIG_LIBHDFS
1586 { .ival = "libhdfs",
1587 .help = "Hadoop Distributed Filesystem (HDFS) engine"
1590 { .ival = "external",
1591 .help = "Load external engine (append name)",
1597 .lname = "IO Depth",
1598 .type = FIO_OPT_INT,
1599 .off1 = td_var_offset(iodepth),
1600 .help = "Number of IO buffers to keep in flight",
1604 .category = FIO_OPT_C_IO,
1605 .group = FIO_OPT_G_IO_BASIC,
1608 .name = "iodepth_batch",
1609 .lname = "IO Depth batch",
1610 .alias = "iodepth_batch_submit",
1611 .type = FIO_OPT_INT,
1612 .off1 = td_var_offset(iodepth_batch),
1613 .help = "Number of IO buffers to submit in one go",
1614 .parent = "iodepth",
1619 .category = FIO_OPT_C_IO,
1620 .group = FIO_OPT_G_IO_BASIC,
1623 .name = "iodepth_batch_complete",
1624 .lname = "IO Depth batch complete",
1625 .type = FIO_OPT_INT,
1626 .off1 = td_var_offset(iodepth_batch_complete),
1627 .help = "Number of IO buffers to retrieve in one go",
1628 .parent = "iodepth",
1633 .category = FIO_OPT_C_IO,
1634 .group = FIO_OPT_G_IO_BASIC,
1637 .name = "iodepth_low",
1638 .lname = "IO Depth batch low",
1639 .type = FIO_OPT_INT,
1640 .off1 = td_var_offset(iodepth_low),
1641 .help = "Low water mark for queuing depth",
1642 .parent = "iodepth",
1645 .category = FIO_OPT_C_IO,
1646 .group = FIO_OPT_G_IO_BASIC,
1651 .type = FIO_OPT_STR_VAL,
1653 .help = "Total size of device or files",
1654 .interval = 1024 * 1024,
1655 .category = FIO_OPT_C_IO,
1656 .group = FIO_OPT_G_INVALID,
1660 .lname = "IO Limit",
1661 .type = FIO_OPT_STR_VAL,
1662 .off1 = td_var_offset(io_limit),
1663 .interval = 1024 * 1024,
1664 .category = FIO_OPT_C_IO,
1665 .group = FIO_OPT_G_INVALID,
1668 .name = "fill_device",
1669 .lname = "Fill device",
1671 .type = FIO_OPT_BOOL,
1672 .off1 = td_var_offset(fill_device),
1673 .help = "Write until an ENOSPC error occurs",
1675 .category = FIO_OPT_C_FILE,
1676 .group = FIO_OPT_G_INVALID,
1680 .lname = "File size",
1681 .type = FIO_OPT_STR_VAL,
1682 .off1 = td_var_offset(file_size_low),
1683 .off2 = td_var_offset(file_size_high),
1685 .help = "Size of individual files",
1686 .interval = 1024 * 1024,
1687 .category = FIO_OPT_C_FILE,
1688 .group = FIO_OPT_G_INVALID,
1691 .name = "file_append",
1692 .lname = "File append",
1693 .type = FIO_OPT_BOOL,
1694 .off1 = td_var_offset(file_append),
1695 .help = "IO will start at the end of the file(s)",
1697 .category = FIO_OPT_C_FILE,
1698 .group = FIO_OPT_G_INVALID,
1702 .lname = "IO offset",
1703 .alias = "fileoffset",
1704 .type = FIO_OPT_STR_VAL,
1705 .off1 = td_var_offset(start_offset),
1706 .help = "Start IO from this offset",
1708 .interval = 1024 * 1024,
1709 .category = FIO_OPT_C_IO,
1710 .group = FIO_OPT_G_INVALID,
1713 .name = "offset_increment",
1714 .lname = "IO offset increment",
1715 .type = FIO_OPT_STR_VAL,
1716 .off1 = td_var_offset(offset_increment),
1717 .help = "What is the increment from one offset to the next",
1721 .interval = 1024 * 1024,
1722 .category = FIO_OPT_C_IO,
1723 .group = FIO_OPT_G_INVALID,
1726 .name = "number_ios",
1727 .lname = "Number of IOs to perform",
1728 .type = FIO_OPT_STR_VAL,
1729 .off1 = td_var_offset(number_ios),
1730 .help = "Force job completion after this number of IOs",
1732 .category = FIO_OPT_C_IO,
1733 .group = FIO_OPT_G_INVALID,
1737 .lname = "Block size",
1738 .alias = "blocksize",
1739 .type = FIO_OPT_INT,
1740 .off1 = td_var_offset(bs[DDIR_READ]),
1741 .off2 = td_var_offset(bs[DDIR_WRITE]),
1742 .off3 = td_var_offset(bs[DDIR_TRIM]),
1744 .help = "Block size unit",
1749 .category = FIO_OPT_C_IO,
1750 .group = FIO_OPT_G_INVALID,
1754 .lname = "Block size align",
1755 .alias = "blockalign",
1756 .type = FIO_OPT_INT,
1757 .off1 = td_var_offset(ba[DDIR_READ]),
1758 .off2 = td_var_offset(ba[DDIR_WRITE]),
1759 .off3 = td_var_offset(ba[DDIR_TRIM]),
1761 .help = "IO block offset alignment",
1765 .category = FIO_OPT_C_IO,
1766 .group = FIO_OPT_G_INVALID,
1770 .lname = "Block size range",
1771 .alias = "blocksize_range",
1772 .type = FIO_OPT_RANGE,
1773 .off1 = td_var_offset(min_bs[DDIR_READ]),
1774 .off2 = td_var_offset(max_bs[DDIR_READ]),
1775 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1776 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1777 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1778 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1780 .help = "Set block size range (in more detail than bs)",
1784 .category = FIO_OPT_C_IO,
1785 .group = FIO_OPT_G_INVALID,
1789 .lname = "Block size split",
1790 .type = FIO_OPT_STR,
1791 .cb = str_bssplit_cb,
1792 .help = "Set a specific mix of block sizes",
1795 .category = FIO_OPT_C_IO,
1796 .group = FIO_OPT_G_INVALID,
1799 .name = "bs_unaligned",
1800 .lname = "Block size unaligned",
1801 .alias = "blocksize_unaligned",
1802 .type = FIO_OPT_STR_SET,
1803 .off1 = td_var_offset(bs_unaligned),
1804 .help = "Don't sector align IO buffer sizes",
1807 .category = FIO_OPT_C_IO,
1808 .group = FIO_OPT_G_INVALID,
1811 .name = "bs_is_seq_rand",
1812 .lname = "Block size division is seq/random (not read/write)",
1813 .type = FIO_OPT_BOOL,
1814 .off1 = td_var_offset(bs_is_seq_rand),
1815 .help = "Consider any blocksize setting to be sequential,random",
1817 .parent = "blocksize",
1818 .category = FIO_OPT_C_IO,
1819 .group = FIO_OPT_G_INVALID,
1822 .name = "randrepeat",
1823 .lname = "Random repeatable",
1824 .type = FIO_OPT_BOOL,
1825 .off1 = td_var_offset(rand_repeatable),
1826 .help = "Use repeatable random IO pattern",
1830 .category = FIO_OPT_C_IO,
1831 .group = FIO_OPT_G_RANDOM,
1835 .lname = "The random generator seed",
1836 .type = FIO_OPT_STR_VAL,
1837 .off1 = td_var_offset(rand_seed),
1838 .help = "Set the random generator seed value",
1840 .category = FIO_OPT_C_IO,
1841 .group = FIO_OPT_G_RANDOM,
1844 .name = "use_os_rand",
1845 .lname = "Use OS random",
1846 .type = FIO_OPT_DEPRECATED,
1847 .off1 = td_var_offset(dep_use_os_rand),
1848 .category = FIO_OPT_C_IO,
1849 .group = FIO_OPT_G_RANDOM,
1852 .name = "norandommap",
1853 .lname = "No randommap",
1854 .type = FIO_OPT_STR_SET,
1855 .off1 = td_var_offset(norandommap),
1856 .help = "Accept potential duplicate random blocks",
1860 .category = FIO_OPT_C_IO,
1861 .group = FIO_OPT_G_RANDOM,
1864 .name = "softrandommap",
1865 .lname = "Soft randommap",
1866 .type = FIO_OPT_BOOL,
1867 .off1 = td_var_offset(softrandommap),
1868 .help = "Set norandommap if randommap allocation fails",
1869 .parent = "norandommap",
1872 .category = FIO_OPT_C_IO,
1873 .group = FIO_OPT_G_RANDOM,
1876 .name = "random_generator",
1877 .type = FIO_OPT_STR,
1878 .off1 = td_var_offset(random_generator),
1879 .help = "Type of random number generator to use",
1880 .def = "tausworthe",
1882 { .ival = "tausworthe",
1883 .oval = FIO_RAND_GEN_TAUSWORTHE,
1884 .help = "Strong Tausworthe generator",
1887 .oval = FIO_RAND_GEN_LFSR,
1888 .help = "Variable length LFSR",
1891 .category = FIO_OPT_C_IO,
1892 .group = FIO_OPT_G_RANDOM,
1895 .name = "random_distribution",
1896 .type = FIO_OPT_STR,
1897 .off1 = td_var_offset(random_distribution),
1898 .cb = str_random_distribution_cb,
1899 .help = "Random offset distribution generator",
1903 .oval = FIO_RAND_DIST_RANDOM,
1904 .help = "Completely random",
1907 .oval = FIO_RAND_DIST_ZIPF,
1908 .help = "Zipf distribution",
1911 .oval = FIO_RAND_DIST_PARETO,
1912 .help = "Pareto distribution",
1915 .category = FIO_OPT_C_IO,
1916 .group = FIO_OPT_G_RANDOM,
1919 .name = "percentage_random",
1920 .lname = "Percentage Random",
1921 .type = FIO_OPT_INT,
1922 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1923 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1924 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1926 .help = "Percentage of seq/random mix that should be random",
1927 .def = "100,100,100",
1929 .inverse = "percentage_sequential",
1930 .category = FIO_OPT_C_IO,
1931 .group = FIO_OPT_G_RANDOM,
1934 .name = "percentage_sequential",
1935 .lname = "Percentage Sequential",
1936 .type = FIO_OPT_DEPRECATED,
1937 .category = FIO_OPT_C_IO,
1938 .group = FIO_OPT_G_RANDOM,
1941 .name = "allrandrepeat",
1942 .type = FIO_OPT_BOOL,
1943 .off1 = td_var_offset(allrand_repeatable),
1944 .help = "Use repeatable random numbers for everything",
1946 .category = FIO_OPT_C_IO,
1947 .group = FIO_OPT_G_RANDOM,
1951 .lname = "Number of files",
1952 .alias = "nr_files",
1953 .type = FIO_OPT_INT,
1954 .off1 = td_var_offset(nr_files),
1955 .help = "Split job workload between this number of files",
1958 .category = FIO_OPT_C_FILE,
1959 .group = FIO_OPT_G_INVALID,
1962 .name = "openfiles",
1963 .lname = "Number of open files",
1964 .type = FIO_OPT_INT,
1965 .off1 = td_var_offset(open_files),
1966 .help = "Number of files to keep open at the same time",
1967 .category = FIO_OPT_C_FILE,
1968 .group = FIO_OPT_G_INVALID,
1971 .name = "file_service_type",
1972 .lname = "File service type",
1973 .type = FIO_OPT_STR,
1975 .off1 = td_var_offset(file_service_type),
1976 .help = "How to select which file to service next",
1977 .def = "roundrobin",
1978 .category = FIO_OPT_C_FILE,
1979 .group = FIO_OPT_G_INVALID,
1982 .oval = FIO_FSERVICE_RANDOM,
1983 .help = "Choose a file at random",
1985 { .ival = "roundrobin",
1986 .oval = FIO_FSERVICE_RR,
1987 .help = "Round robin select files",
1989 { .ival = "sequential",
1990 .oval = FIO_FSERVICE_SEQ,
1991 .help = "Finish one file before moving to the next",
1994 .parent = "nrfiles",
1997 #ifdef CONFIG_POSIX_FALLOCATE
1999 .name = "fallocate",
2000 .lname = "Fallocate",
2001 .type = FIO_OPT_STR,
2002 .off1 = td_var_offset(fallocate_mode),
2003 .help = "Whether pre-allocation is performed when laying out files",
2005 .category = FIO_OPT_C_FILE,
2006 .group = FIO_OPT_G_INVALID,
2009 .oval = FIO_FALLOCATE_NONE,
2010 .help = "Do not pre-allocate space",
2013 .oval = FIO_FALLOCATE_POSIX,
2014 .help = "Use posix_fallocate()",
2016 #ifdef CONFIG_LINUX_FALLOCATE
2018 .oval = FIO_FALLOCATE_KEEP_SIZE,
2019 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
2022 /* Compatibility with former boolean values */
2024 .oval = FIO_FALLOCATE_NONE,
2025 .help = "Alias for 'none'",
2028 .oval = FIO_FALLOCATE_POSIX,
2029 .help = "Alias for 'posix'",
2033 #endif /* CONFIG_POSIX_FALLOCATE */
2035 .name = "fadvise_hint",
2036 .lname = "Fadvise hint",
2037 .type = FIO_OPT_BOOL,
2038 .off1 = td_var_offset(fadvise_hint),
2039 .help = "Use fadvise() to advise the kernel on IO pattern",
2041 .category = FIO_OPT_C_FILE,
2042 .group = FIO_OPT_G_INVALID,
2047 .type = FIO_OPT_INT,
2048 .off1 = td_var_offset(fsync_blocks),
2049 .help = "Issue fsync for writes every given number of blocks",
2052 .category = FIO_OPT_C_FILE,
2053 .group = FIO_OPT_G_INVALID,
2056 .name = "fdatasync",
2057 .lname = "Fdatasync",
2058 .type = FIO_OPT_INT,
2059 .off1 = td_var_offset(fdatasync_blocks),
2060 .help = "Issue fdatasync for writes every given number of blocks",
2063 .category = FIO_OPT_C_FILE,
2064 .group = FIO_OPT_G_INVALID,
2067 .name = "write_barrier",
2068 .lname = "Write barrier",
2069 .type = FIO_OPT_INT,
2070 .off1 = td_var_offset(barrier_blocks),
2071 .help = "Make every Nth write a barrier write",
2074 .category = FIO_OPT_C_IO,
2075 .group = FIO_OPT_G_INVALID,
2077 #ifdef CONFIG_SYNC_FILE_RANGE
2079 .name = "sync_file_range",
2080 .lname = "Sync file range",
2082 { .ival = "wait_before",
2083 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
2084 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
2088 .oval = SYNC_FILE_RANGE_WRITE,
2089 .help = "SYNC_FILE_RANGE_WRITE",
2093 .ival = "wait_after",
2094 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
2095 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
2099 .type = FIO_OPT_STR_MULTI,
2101 .off1 = td_var_offset(sync_file_range),
2102 .help = "Use sync_file_range()",
2103 .category = FIO_OPT_C_FILE,
2104 .group = FIO_OPT_G_INVALID,
2109 .lname = "Direct I/O",
2110 .type = FIO_OPT_BOOL,
2111 .off1 = td_var_offset(odirect),
2112 .help = "Use O_DIRECT IO (negates buffered)",
2114 .inverse = "buffered",
2115 .category = FIO_OPT_C_IO,
2116 .group = FIO_OPT_G_IO_TYPE,
2120 .lname = "Atomic I/O",
2121 .type = FIO_OPT_BOOL,
2122 .off1 = td_var_offset(oatomic),
2123 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
2125 .category = FIO_OPT_C_IO,
2126 .group = FIO_OPT_G_IO_TYPE,
2130 .lname = "Buffered I/O",
2131 .type = FIO_OPT_BOOL,
2132 .off1 = td_var_offset(odirect),
2134 .help = "Use buffered IO (negates direct)",
2136 .inverse = "direct",
2137 .category = FIO_OPT_C_IO,
2138 .group = FIO_OPT_G_IO_TYPE,
2141 .name = "overwrite",
2142 .lname = "Overwrite",
2143 .type = FIO_OPT_BOOL,
2144 .off1 = td_var_offset(overwrite),
2145 .help = "When writing, set whether to overwrite current data",
2147 .category = FIO_OPT_C_FILE,
2148 .group = FIO_OPT_G_INVALID,
2153 .type = FIO_OPT_INT,
2154 .off1 = td_var_offset(loops),
2155 .help = "Number of times to run the job",
2158 .category = FIO_OPT_C_GENERAL,
2159 .group = FIO_OPT_G_RUNTIME,
2163 .lname = "Number of jobs",
2164 .type = FIO_OPT_INT,
2165 .off1 = td_var_offset(numjobs),
2166 .help = "Duplicate this job this many times",
2169 .category = FIO_OPT_C_GENERAL,
2170 .group = FIO_OPT_G_RUNTIME,
2173 .name = "startdelay",
2174 .lname = "Start delay",
2175 .type = FIO_OPT_STR_VAL_TIME,
2176 .off1 = td_var_offset(start_delay),
2177 .off2 = td_var_offset(start_delay_high),
2178 .help = "Only start job when this period has passed",
2182 .category = FIO_OPT_C_GENERAL,
2183 .group = FIO_OPT_G_RUNTIME,
2189 .type = FIO_OPT_STR_VAL_TIME,
2190 .off1 = td_var_offset(timeout),
2191 .help = "Stop workload when this amount of time has passed",
2195 .category = FIO_OPT_C_GENERAL,
2196 .group = FIO_OPT_G_RUNTIME,
2199 .name = "time_based",
2200 .lname = "Time based",
2201 .type = FIO_OPT_STR_SET,
2202 .off1 = td_var_offset(time_based),
2203 .help = "Keep running until runtime/timeout is met",
2204 .category = FIO_OPT_C_GENERAL,
2205 .group = FIO_OPT_G_RUNTIME,
2208 .name = "verify_only",
2209 .lname = "Verify only",
2210 .type = FIO_OPT_STR_SET,
2211 .off1 = td_var_offset(verify_only),
2212 .help = "Verifies previously written data is still valid",
2213 .category = FIO_OPT_C_GENERAL,
2214 .group = FIO_OPT_G_RUNTIME,
2217 .name = "ramp_time",
2218 .lname = "Ramp time",
2219 .type = FIO_OPT_STR_VAL_TIME,
2220 .off1 = td_var_offset(ramp_time),
2221 .help = "Ramp up time before measuring performance",
2224 .category = FIO_OPT_C_GENERAL,
2225 .group = FIO_OPT_G_RUNTIME,
2228 .name = "clocksource",
2229 .lname = "Clock source",
2230 .type = FIO_OPT_STR,
2231 .cb = fio_clock_source_cb,
2232 .off1 = td_var_offset(clocksource),
2233 .help = "What type of timing source to use",
2234 .category = FIO_OPT_C_GENERAL,
2235 .group = FIO_OPT_G_CLOCK,
2237 #ifdef CONFIG_GETTIMEOFDAY
2238 { .ival = "gettimeofday",
2240 .help = "Use gettimeofday(2) for timing",
2243 #ifdef CONFIG_CLOCK_GETTIME
2244 { .ival = "clock_gettime",
2245 .oval = CS_CGETTIME,
2246 .help = "Use clock_gettime(2) for timing",
2249 #ifdef ARCH_HAVE_CPU_CLOCK
2251 .oval = CS_CPUCLOCK,
2252 .help = "Use CPU private clock",
2260 .lname = "I/O Memory",
2261 .type = FIO_OPT_STR,
2263 .off1 = td_var_offset(mem_type),
2264 .help = "Backing type for IO buffers",
2266 .category = FIO_OPT_C_IO,
2267 .group = FIO_OPT_G_INVALID,
2271 .help = "Use malloc(3) for IO buffers",
2273 #ifndef CONFIG_NO_SHM
2276 .help = "Use shared memory segments for IO buffers",
2278 #ifdef FIO_HAVE_HUGETLB
2279 { .ival = "shmhuge",
2280 .oval = MEM_SHMHUGE,
2281 .help = "Like shm, but use huge pages",
2287 .help = "Use mmap(2) (file or anon) for IO buffers",
2289 #ifdef FIO_HAVE_HUGETLB
2290 { .ival = "mmaphuge",
2291 .oval = MEM_MMAPHUGE,
2292 .help = "Like mmap, but use huge pages",
2298 .name = "iomem_align",
2299 .alias = "mem_align",
2300 .lname = "I/O memory alignment",
2301 .type = FIO_OPT_INT,
2302 .off1 = td_var_offset(mem_align),
2304 .help = "IO memory buffer offset alignment",
2308 .category = FIO_OPT_C_IO,
2309 .group = FIO_OPT_G_INVALID,
2314 .type = FIO_OPT_STR,
2315 .off1 = td_var_offset(verify),
2316 .help = "Verify data written",
2318 .category = FIO_OPT_C_IO,
2319 .group = FIO_OPT_G_VERIFY,
2322 .oval = VERIFY_NONE,
2323 .help = "Don't do IO verification",
2327 .help = "Use md5 checksums for verification",
2330 .oval = VERIFY_CRC64,
2331 .help = "Use crc64 checksums for verification",
2334 .oval = VERIFY_CRC32,
2335 .help = "Use crc32 checksums for verification",
2337 { .ival = "crc32c-intel",
2338 .oval = VERIFY_CRC32C,
2339 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2342 .oval = VERIFY_CRC32C,
2343 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2346 .oval = VERIFY_CRC16,
2347 .help = "Use crc16 checksums for verification",
2350 .oval = VERIFY_CRC7,
2351 .help = "Use crc7 checksums for verification",
2354 .oval = VERIFY_SHA1,
2355 .help = "Use sha1 checksums for verification",
2358 .oval = VERIFY_SHA256,
2359 .help = "Use sha256 checksums for verification",
2362 .oval = VERIFY_SHA512,
2363 .help = "Use sha512 checksums for verification",
2366 .oval = VERIFY_XXHASH,
2367 .help = "Use xxhash checksums for verification",
2370 .oval = VERIFY_META,
2371 .help = "Use io information",
2375 .oval = VERIFY_NULL,
2376 .help = "Pretend to verify",
2381 .name = "do_verify",
2382 .lname = "Perform verify step",
2383 .type = FIO_OPT_BOOL,
2384 .off1 = td_var_offset(do_verify),
2385 .help = "Run verification stage after write",
2389 .category = FIO_OPT_C_IO,
2390 .group = FIO_OPT_G_VERIFY,
2393 .name = "verifysort",
2394 .lname = "Verify sort",
2395 .type = FIO_OPT_BOOL,
2396 .off1 = td_var_offset(verifysort),
2397 .help = "Sort written verify blocks for read back",
2401 .category = FIO_OPT_C_IO,
2402 .group = FIO_OPT_G_VERIFY,
2405 .name = "verifysort_nr",
2406 .type = FIO_OPT_INT,
2407 .off1 = td_var_offset(verifysort_nr),
2408 .help = "Pre-load and sort verify blocks for a read workload",
2413 .category = FIO_OPT_C_IO,
2414 .group = FIO_OPT_G_VERIFY,
2417 .name = "verify_interval",
2418 .lname = "Verify interval",
2419 .type = FIO_OPT_INT,
2420 .off1 = td_var_offset(verify_interval),
2421 .minval = 2 * sizeof(struct verify_header),
2422 .help = "Store verify buffer header every N bytes",
2425 .interval = 2 * sizeof(struct verify_header),
2426 .category = FIO_OPT_C_IO,
2427 .group = FIO_OPT_G_VERIFY,
2430 .name = "verify_offset",
2431 .lname = "Verify offset",
2432 .type = FIO_OPT_INT,
2433 .help = "Offset verify header location by N bytes",
2434 .off1 = td_var_offset(verify_offset),
2435 .minval = sizeof(struct verify_header),
2438 .category = FIO_OPT_C_IO,
2439 .group = FIO_OPT_G_VERIFY,
2442 .name = "verify_pattern",
2443 .lname = "Verify pattern",
2444 .type = FIO_OPT_STR,
2445 .cb = str_verify_pattern_cb,
2446 .help = "Fill pattern for IO buffers",
2449 .category = FIO_OPT_C_IO,
2450 .group = FIO_OPT_G_VERIFY,
2453 .name = "verify_fatal",
2454 .lname = "Verify fatal",
2455 .type = FIO_OPT_BOOL,
2456 .off1 = td_var_offset(verify_fatal),
2458 .help = "Exit on a single verify failure, don't continue",
2461 .category = FIO_OPT_C_IO,
2462 .group = FIO_OPT_G_VERIFY,
2465 .name = "verify_dump",
2466 .lname = "Verify dump",
2467 .type = FIO_OPT_BOOL,
2468 .off1 = td_var_offset(verify_dump),
2470 .help = "Dump contents of good and bad blocks on failure",
2473 .category = FIO_OPT_C_IO,
2474 .group = FIO_OPT_G_VERIFY,
2477 .name = "verify_async",
2478 .lname = "Verify asynchronously",
2479 .type = FIO_OPT_INT,
2480 .off1 = td_var_offset(verify_async),
2482 .help = "Number of async verifier threads to use",
2485 .category = FIO_OPT_C_IO,
2486 .group = FIO_OPT_G_VERIFY,
2489 .name = "verify_backlog",
2490 .lname = "Verify backlog",
2491 .type = FIO_OPT_STR_VAL,
2492 .off1 = td_var_offset(verify_backlog),
2493 .help = "Verify after this number of blocks are written",
2496 .category = FIO_OPT_C_IO,
2497 .group = FIO_OPT_G_VERIFY,
2500 .name = "verify_backlog_batch",
2501 .lname = "Verify backlog batch",
2502 .type = FIO_OPT_INT,
2503 .off1 = td_var_offset(verify_batch),
2504 .help = "Verify this number of IO blocks",
2507 .category = FIO_OPT_C_IO,
2508 .group = FIO_OPT_G_VERIFY,
2510 #ifdef FIO_HAVE_CPU_AFFINITY
2512 .name = "verify_async_cpus",
2513 .lname = "Async verify CPUs",
2514 .type = FIO_OPT_STR,
2515 .cb = str_verify_cpus_allowed_cb,
2516 .help = "Set CPUs allowed for async verify threads",
2517 .parent = "verify_async",
2519 .category = FIO_OPT_C_IO,
2520 .group = FIO_OPT_G_VERIFY,
2524 .name = "experimental_verify",
2525 .off1 = td_var_offset(experimental_verify),
2526 .type = FIO_OPT_BOOL,
2527 .help = "Enable experimental verification",
2529 .category = FIO_OPT_C_IO,
2530 .group = FIO_OPT_G_VERIFY,
2533 .name = "verify_state_load",
2534 .lname = "Load verify state",
2535 .off1 = td_var_offset(verify_state),
2536 .type = FIO_OPT_BOOL,
2537 .help = "Load verify termination state",
2539 .category = FIO_OPT_C_IO,
2540 .group = FIO_OPT_G_VERIFY,
2543 .name = "verify_state_save",
2544 .lname = "Save verify state",
2545 .off1 = td_var_offset(verify_state_save),
2546 .type = FIO_OPT_BOOL,
2548 .help = "Save verify state on termination",
2550 .category = FIO_OPT_C_IO,
2551 .group = FIO_OPT_G_VERIFY,
2553 #ifdef FIO_HAVE_TRIM
2555 .name = "trim_percentage",
2556 .lname = "Trim percentage",
2557 .type = FIO_OPT_INT,
2558 .off1 = td_var_offset(trim_percentage),
2561 .help = "Number of verify blocks to discard/trim",
2566 .category = FIO_OPT_C_IO,
2567 .group = FIO_OPT_G_TRIM,
2570 .name = "trim_verify_zero",
2571 .lname = "Verify trim zero",
2572 .type = FIO_OPT_BOOL,
2573 .help = "Verify that trim/discarded blocks are returned as zeroes",
2574 .off1 = td_var_offset(trim_zero),
2575 .parent = "trim_percentage",
2578 .category = FIO_OPT_C_IO,
2579 .group = FIO_OPT_G_TRIM,
2582 .name = "trim_backlog",
2583 .lname = "Trim backlog",
2584 .type = FIO_OPT_STR_VAL,
2585 .off1 = td_var_offset(trim_backlog),
2586 .help = "Trim after this number of blocks are written",
2587 .parent = "trim_percentage",
2590 .category = FIO_OPT_C_IO,
2591 .group = FIO_OPT_G_TRIM,
2594 .name = "trim_backlog_batch",
2595 .lname = "Trim backlog batch",
2596 .type = FIO_OPT_INT,
2597 .off1 = td_var_offset(trim_batch),
2598 .help = "Trim this number of IO blocks",
2599 .parent = "trim_percentage",
2602 .category = FIO_OPT_C_IO,
2603 .group = FIO_OPT_G_TRIM,
2607 .name = "write_iolog",
2608 .lname = "Write I/O log",
2609 .type = FIO_OPT_STR_STORE,
2610 .off1 = td_var_offset(write_iolog_file),
2611 .help = "Store IO pattern to file",
2612 .category = FIO_OPT_C_IO,
2613 .group = FIO_OPT_G_IOLOG,
2616 .name = "read_iolog",
2617 .lname = "Read I/O log",
2618 .type = FIO_OPT_STR_STORE,
2619 .off1 = td_var_offset(read_iolog_file),
2620 .help = "Playback IO pattern from file",
2621 .category = FIO_OPT_C_IO,
2622 .group = FIO_OPT_G_IOLOG,
2625 .name = "replay_no_stall",
2626 .lname = "Don't stall on replay",
2627 .type = FIO_OPT_BOOL,
2628 .off1 = td_var_offset(no_stall),
2630 .parent = "read_iolog",
2632 .help = "Playback IO pattern file as fast as possible without stalls",
2633 .category = FIO_OPT_C_IO,
2634 .group = FIO_OPT_G_IOLOG,
2637 .name = "replay_redirect",
2638 .lname = "Redirect device for replay",
2639 .type = FIO_OPT_STR_STORE,
2640 .off1 = td_var_offset(replay_redirect),
2641 .parent = "read_iolog",
2643 .help = "Replay all I/O onto this device, regardless of trace device",
2644 .category = FIO_OPT_C_IO,
2645 .group = FIO_OPT_G_IOLOG,
2648 .name = "exec_prerun",
2649 .lname = "Pre-execute runnable",
2650 .type = FIO_OPT_STR_STORE,
2651 .off1 = td_var_offset(exec_prerun),
2652 .help = "Execute this file prior to running job",
2653 .category = FIO_OPT_C_GENERAL,
2654 .group = FIO_OPT_G_INVALID,
2657 .name = "exec_postrun",
2658 .lname = "Post-execute runnable",
2659 .type = FIO_OPT_STR_STORE,
2660 .off1 = td_var_offset(exec_postrun),
2661 .help = "Execute this file after running job",
2662 .category = FIO_OPT_C_GENERAL,
2663 .group = FIO_OPT_G_INVALID,
2665 #ifdef FIO_HAVE_IOSCHED_SWITCH
2667 .name = "ioscheduler",
2668 .lname = "I/O scheduler",
2669 .type = FIO_OPT_STR_STORE,
2670 .off1 = td_var_offset(ioscheduler),
2671 .help = "Use this IO scheduler on the backing device",
2672 .category = FIO_OPT_C_FILE,
2673 .group = FIO_OPT_G_INVALID,
2678 .lname = "Zone size",
2679 .type = FIO_OPT_STR_VAL,
2680 .off1 = td_var_offset(zone_size),
2681 .help = "Amount of data to read per zone",
2683 .interval = 1024 * 1024,
2684 .category = FIO_OPT_C_IO,
2685 .group = FIO_OPT_G_ZONE,
2688 .name = "zonerange",
2689 .lname = "Zone range",
2690 .type = FIO_OPT_STR_VAL,
2691 .off1 = td_var_offset(zone_range),
2692 .help = "Give size of an IO zone",
2694 .interval = 1024 * 1024,
2695 .category = FIO_OPT_C_IO,
2696 .group = FIO_OPT_G_ZONE,
2700 .lname = "Zone skip",
2701 .type = FIO_OPT_STR_VAL,
2702 .off1 = td_var_offset(zone_skip),
2703 .help = "Space between IO zones",
2705 .interval = 1024 * 1024,
2706 .category = FIO_OPT_C_IO,
2707 .group = FIO_OPT_G_ZONE,
2711 .lname = "Lock memory",
2712 .type = FIO_OPT_STR_VAL,
2713 .off1 = td_var_offset(lockmem),
2714 .help = "Lock down this amount of memory (per worker)",
2716 .interval = 1024 * 1024,
2717 .category = FIO_OPT_C_GENERAL,
2718 .group = FIO_OPT_G_INVALID,
2721 .name = "rwmixread",
2722 .lname = "Read/write mix read",
2723 .type = FIO_OPT_INT,
2724 .cb = str_rwmix_read_cb,
2726 .help = "Percentage of mixed workload that is reads",
2729 .inverse = "rwmixwrite",
2730 .category = FIO_OPT_C_IO,
2731 .group = FIO_OPT_G_RWMIX,
2734 .name = "rwmixwrite",
2735 .lname = "Read/write mix write",
2736 .type = FIO_OPT_INT,
2737 .cb = str_rwmix_write_cb,
2739 .help = "Percentage of mixed workload that is writes",
2742 .inverse = "rwmixread",
2743 .category = FIO_OPT_C_IO,
2744 .group = FIO_OPT_G_RWMIX,
2747 .name = "rwmixcycle",
2748 .lname = "Read/write mix cycle",
2749 .type = FIO_OPT_DEPRECATED,
2750 .category = FIO_OPT_C_IO,
2751 .group = FIO_OPT_G_RWMIX,
2756 .type = FIO_OPT_INT,
2757 .off1 = td_var_offset(nice),
2758 .help = "Set job CPU nice value",
2763 .category = FIO_OPT_C_GENERAL,
2764 .group = FIO_OPT_G_CRED,
2766 #ifdef FIO_HAVE_IOPRIO
2769 .lname = "I/O nice priority",
2770 .type = FIO_OPT_INT,
2771 .off1 = td_var_offset(ioprio),
2772 .help = "Set job IO priority value",
2776 .category = FIO_OPT_C_GENERAL,
2777 .group = FIO_OPT_G_CRED,
2780 .name = "prioclass",
2781 .lname = "I/O nice priority class",
2782 .type = FIO_OPT_INT,
2783 .off1 = td_var_offset(ioprio_class),
2784 .help = "Set job IO priority class",
2788 .category = FIO_OPT_C_GENERAL,
2789 .group = FIO_OPT_G_CRED,
2793 .name = "thinktime",
2794 .lname = "Thinktime",
2795 .type = FIO_OPT_INT,
2796 .off1 = td_var_offset(thinktime),
2797 .help = "Idle time between IO buffers (usec)",
2800 .category = FIO_OPT_C_IO,
2801 .group = FIO_OPT_G_THINKTIME,
2804 .name = "thinktime_spin",
2805 .lname = "Thinktime spin",
2806 .type = FIO_OPT_INT,
2807 .off1 = td_var_offset(thinktime_spin),
2808 .help = "Start think time by spinning this amount (usec)",
2811 .parent = "thinktime",
2813 .category = FIO_OPT_C_IO,
2814 .group = FIO_OPT_G_THINKTIME,
2817 .name = "thinktime_blocks",
2818 .lname = "Thinktime blocks",
2819 .type = FIO_OPT_INT,
2820 .off1 = td_var_offset(thinktime_blocks),
2821 .help = "IO buffer period between 'thinktime'",
2823 .parent = "thinktime",
2825 .category = FIO_OPT_C_IO,
2826 .group = FIO_OPT_G_THINKTIME,
2830 .lname = "I/O rate",
2831 .type = FIO_OPT_INT,
2832 .off1 = td_var_offset(rate[DDIR_READ]),
2833 .off2 = td_var_offset(rate[DDIR_WRITE]),
2834 .off3 = td_var_offset(rate[DDIR_TRIM]),
2835 .help = "Set bandwidth rate",
2836 .category = FIO_OPT_C_IO,
2837 .group = FIO_OPT_G_RATE,
2841 .lname = "I/O min rate",
2842 .type = FIO_OPT_INT,
2843 .off1 = td_var_offset(ratemin[DDIR_READ]),
2844 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2845 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2846 .help = "Job must meet this rate or it will be shutdown",
2849 .category = FIO_OPT_C_IO,
2850 .group = FIO_OPT_G_RATE,
2853 .name = "rate_iops",
2854 .lname = "I/O rate IOPS",
2855 .type = FIO_OPT_INT,
2856 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2857 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2858 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2859 .help = "Limit IO used to this number of IO operations/sec",
2861 .category = FIO_OPT_C_IO,
2862 .group = FIO_OPT_G_RATE,
2865 .name = "rate_iops_min",
2866 .lname = "I/O min rate IOPS",
2867 .type = FIO_OPT_INT,
2868 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2869 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2870 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2871 .help = "Job must meet this rate or it will be shut down",
2872 .parent = "rate_iops",
2874 .category = FIO_OPT_C_IO,
2875 .group = FIO_OPT_G_RATE,
2878 .name = "ratecycle",
2879 .lname = "I/O rate cycle",
2880 .type = FIO_OPT_INT,
2881 .off1 = td_var_offset(ratecycle),
2882 .help = "Window average for rate limits (msec)",
2886 .category = FIO_OPT_C_IO,
2887 .group = FIO_OPT_G_RATE,
2890 .name = "max_latency",
2891 .type = FIO_OPT_INT,
2892 .off1 = td_var_offset(max_latency),
2893 .help = "Maximum tolerated IO latency (usec)",
2895 .category = FIO_OPT_C_IO,
2896 .group = FIO_OPT_G_LATPROF,
2899 .name = "latency_target",
2900 .lname = "Latency Target (usec)",
2901 .type = FIO_OPT_STR_VAL_TIME,
2902 .off1 = td_var_offset(latency_target),
2903 .help = "Ramp to max queue depth supporting this latency",
2905 .category = FIO_OPT_C_IO,
2906 .group = FIO_OPT_G_LATPROF,
2909 .name = "latency_window",
2910 .lname = "Latency Window (usec)",
2911 .type = FIO_OPT_STR_VAL_TIME,
2912 .off1 = td_var_offset(latency_window),
2913 .help = "Time to sustain latency_target",
2915 .category = FIO_OPT_C_IO,
2916 .group = FIO_OPT_G_LATPROF,
2919 .name = "latency_percentile",
2920 .lname = "Latency Percentile",
2921 .type = FIO_OPT_FLOAT_LIST,
2922 .off1 = td_var_offset(latency_percentile),
2923 .help = "Percentile of IOs must be below latency_target",
2928 .category = FIO_OPT_C_IO,
2929 .group = FIO_OPT_G_LATPROF,
2932 .name = "invalidate",
2933 .lname = "Cache invalidate",
2934 .type = FIO_OPT_BOOL,
2935 .off1 = td_var_offset(invalidate_cache),
2936 .help = "Invalidate buffer/page cache prior to running job",
2938 .category = FIO_OPT_C_IO,
2939 .group = FIO_OPT_G_IO_TYPE,
2943 .lname = "Synchronous I/O",
2944 .type = FIO_OPT_BOOL,
2945 .off1 = td_var_offset(sync_io),
2946 .help = "Use O_SYNC for buffered writes",
2948 .parent = "buffered",
2950 .category = FIO_OPT_C_IO,
2951 .group = FIO_OPT_G_IO_TYPE,
2954 .name = "create_serialize",
2955 .lname = "Create serialize",
2956 .type = FIO_OPT_BOOL,
2957 .off1 = td_var_offset(create_serialize),
2958 .help = "Serialize creating of job files",
2960 .category = FIO_OPT_C_FILE,
2961 .group = FIO_OPT_G_INVALID,
2964 .name = "create_fsync",
2965 .lname = "Create fsync",
2966 .type = FIO_OPT_BOOL,
2967 .off1 = td_var_offset(create_fsync),
2968 .help = "fsync file after creation",
2970 .category = FIO_OPT_C_FILE,
2971 .group = FIO_OPT_G_INVALID,
2974 .name = "create_on_open",
2975 .lname = "Create on open",
2976 .type = FIO_OPT_BOOL,
2977 .off1 = td_var_offset(create_on_open),
2978 .help = "Create files when they are opened for IO",
2980 .category = FIO_OPT_C_FILE,
2981 .group = FIO_OPT_G_INVALID,
2984 .name = "create_only",
2985 .type = FIO_OPT_BOOL,
2986 .off1 = td_var_offset(create_only),
2987 .help = "Only perform file creation phase",
2988 .category = FIO_OPT_C_FILE,
2993 .lname = "Pre-read files",
2994 .type = FIO_OPT_BOOL,
2995 .off1 = td_var_offset(pre_read),
2996 .help = "Pre-read files before starting official testing",
2998 .category = FIO_OPT_C_FILE,
2999 .group = FIO_OPT_G_INVALID,
3001 #ifdef FIO_HAVE_CPU_AFFINITY
3004 .lname = "CPU mask",
3005 .type = FIO_OPT_INT,
3006 .cb = str_cpumask_cb,
3007 .help = "CPU affinity mask",
3008 .category = FIO_OPT_C_GENERAL,
3009 .group = FIO_OPT_G_CRED,
3012 .name = "cpus_allowed",
3013 .lname = "CPUs allowed",
3014 .type = FIO_OPT_STR,
3015 .cb = str_cpus_allowed_cb,
3016 .help = "Set CPUs allowed",
3017 .category = FIO_OPT_C_GENERAL,
3018 .group = FIO_OPT_G_CRED,
3021 .name = "cpus_allowed_policy",
3022 .lname = "CPUs allowed distribution policy",
3023 .type = FIO_OPT_STR,
3024 .off1 = td_var_offset(cpus_allowed_policy),
3025 .help = "Distribution policy for cpus_allowed",
3026 .parent = "cpus_allowed",
3030 .oval = FIO_CPUS_SHARED,
3031 .help = "Mask shared between threads",
3034 .oval = FIO_CPUS_SPLIT,
3035 .help = "Mask split between threads",
3038 .category = FIO_OPT_C_GENERAL,
3039 .group = FIO_OPT_G_CRED,
3042 #ifdef CONFIG_LIBNUMA
3044 .name = "numa_cpu_nodes",
3045 .type = FIO_OPT_STR,
3046 .cb = str_numa_cpunodes_cb,
3047 .help = "NUMA CPU nodes bind",
3048 .category = FIO_OPT_C_GENERAL,
3049 .group = FIO_OPT_G_INVALID,
3052 .name = "numa_mem_policy",
3053 .type = FIO_OPT_STR,
3054 .cb = str_numa_mpol_cb,
3055 .help = "NUMA memory policy setup",
3056 .category = FIO_OPT_C_GENERAL,
3057 .group = FIO_OPT_G_INVALID,
3061 .name = "end_fsync",
3062 .lname = "End fsync",
3063 .type = FIO_OPT_BOOL,
3064 .off1 = td_var_offset(end_fsync),
3065 .help = "Include fsync at the end of job",
3067 .category = FIO_OPT_C_FILE,
3068 .group = FIO_OPT_G_INVALID,
3071 .name = "fsync_on_close",
3072 .lname = "Fsync on close",
3073 .type = FIO_OPT_BOOL,
3074 .off1 = td_var_offset(fsync_on_close),
3075 .help = "fsync files on close",
3077 .category = FIO_OPT_C_FILE,
3078 .group = FIO_OPT_G_INVALID,
3082 .lname = "Unlink file",
3083 .type = FIO_OPT_BOOL,
3084 .off1 = td_var_offset(unlink),
3085 .help = "Unlink created files after job has completed",
3087 .category = FIO_OPT_C_FILE,
3088 .group = FIO_OPT_G_INVALID,
3092 .lname = "Exit-all on terminate",
3093 .type = FIO_OPT_STR_SET,
3094 .cb = str_exitall_cb,
3095 .help = "Terminate all jobs when one exits",
3096 .category = FIO_OPT_C_GENERAL,
3097 .group = FIO_OPT_G_PROCESS,
3100 .name = "stonewall",
3101 .lname = "Wait for previous",
3102 .alias = "wait_for_previous",
3103 .type = FIO_OPT_STR_SET,
3104 .off1 = td_var_offset(stonewall),
3105 .help = "Insert a hard barrier between this job and previous",
3106 .category = FIO_OPT_C_GENERAL,
3107 .group = FIO_OPT_G_PROCESS,
3110 .name = "new_group",
3111 .lname = "New group",
3112 .type = FIO_OPT_STR_SET,
3113 .off1 = td_var_offset(new_group),
3114 .help = "Mark the start of a new group (for reporting)",
3115 .category = FIO_OPT_C_GENERAL,
3116 .group = FIO_OPT_G_PROCESS,
3121 .type = FIO_OPT_STR_SET,
3122 .off1 = td_var_offset(use_thread),
3123 .help = "Use threads instead of processes",
3124 #ifdef CONFIG_NO_SHM
3128 .category = FIO_OPT_C_GENERAL,
3129 .group = FIO_OPT_G_PROCESS,
3132 .name = "write_bw_log",
3133 .lname = "Write bandwidth log",
3134 .type = FIO_OPT_STR_STORE,
3135 .off1 = td_var_offset(bw_log_file),
3136 .help = "Write log of bandwidth during run",
3137 .category = FIO_OPT_C_LOG,
3138 .group = FIO_OPT_G_INVALID,
3141 .name = "write_lat_log",
3142 .lname = "Write latency log",
3143 .type = FIO_OPT_STR_STORE,
3144 .off1 = td_var_offset(lat_log_file),
3145 .help = "Write log of latency during run",
3146 .category = FIO_OPT_C_LOG,
3147 .group = FIO_OPT_G_INVALID,
3150 .name = "write_iops_log",
3151 .lname = "Write IOPS log",
3152 .type = FIO_OPT_STR_STORE,
3153 .off1 = td_var_offset(iops_log_file),
3154 .help = "Write log of IOPS during run",
3155 .category = FIO_OPT_C_LOG,
3156 .group = FIO_OPT_G_INVALID,
3159 .name = "log_avg_msec",
3160 .lname = "Log averaging (msec)",
3161 .type = FIO_OPT_INT,
3162 .off1 = td_var_offset(log_avg_msec),
3163 .help = "Average bw/iops/lat logs over this period of time",
3165 .category = FIO_OPT_C_LOG,
3166 .group = FIO_OPT_G_INVALID,
3169 .name = "log_offset",
3170 .lname = "Log offset of IO",
3171 .type = FIO_OPT_BOOL,
3172 .off1 = td_var_offset(log_offset),
3173 .help = "Include offset of IO for each log entry",
3175 .category = FIO_OPT_C_LOG,
3176 .group = FIO_OPT_G_INVALID,
3180 .name = "log_compression",
3181 .lname = "Log compression",
3182 .type = FIO_OPT_INT,
3183 .off1 = td_var_offset(log_gz),
3184 .help = "Log in compressed chunks of this size",
3185 .minval = 32 * 1024 * 1024ULL,
3186 .maxval = 512 * 1024 * 1024ULL,
3187 .category = FIO_OPT_C_LOG,
3188 .group = FIO_OPT_G_INVALID,
3191 .name = "log_store_compressed",
3192 .lname = "Log store compressed",
3193 .type = FIO_OPT_BOOL,
3194 .off1 = td_var_offset(log_gz_store),
3195 .help = "Store logs in a compressed format",
3196 .category = FIO_OPT_C_LOG,
3197 .group = FIO_OPT_G_INVALID,
3201 .name = "bwavgtime",
3202 .lname = "Bandwidth average time",
3203 .type = FIO_OPT_INT,
3204 .off1 = td_var_offset(bw_avg_time),
3205 .help = "Time window over which to calculate bandwidth"
3208 .parent = "write_bw_log",
3211 .category = FIO_OPT_C_LOG,
3212 .group = FIO_OPT_G_INVALID,
3215 .name = "iopsavgtime",
3216 .lname = "IOPS average time",
3217 .type = FIO_OPT_INT,
3218 .off1 = td_var_offset(iops_avg_time),
3219 .help = "Time window over which to calculate IOPS (msec)",
3221 .parent = "write_iops_log",
3224 .category = FIO_OPT_C_LOG,
3225 .group = FIO_OPT_G_INVALID,
3228 .name = "group_reporting",
3229 .lname = "Group reporting",
3230 .type = FIO_OPT_STR_SET,
3231 .off1 = td_var_offset(group_reporting),
3232 .help = "Do reporting on a per-group basis",
3233 .category = FIO_OPT_C_STAT,
3234 .group = FIO_OPT_G_INVALID,
3237 .name = "zero_buffers",
3238 .lname = "Zero I/O buffers",
3239 .type = FIO_OPT_STR_SET,
3240 .off1 = td_var_offset(zero_buffers),
3241 .help = "Init IO buffers to all zeroes",
3242 .category = FIO_OPT_C_IO,
3243 .group = FIO_OPT_G_IO_BUF,
3246 .name = "refill_buffers",
3247 .lname = "Refill I/O buffers",
3248 .type = FIO_OPT_STR_SET,
3249 .off1 = td_var_offset(refill_buffers),
3250 .help = "Refill IO buffers on every IO submit",
3251 .category = FIO_OPT_C_IO,
3252 .group = FIO_OPT_G_IO_BUF,
3255 .name = "scramble_buffers",
3256 .lname = "Scramble I/O buffers",
3257 .type = FIO_OPT_BOOL,
3258 .off1 = td_var_offset(scramble_buffers),
3259 .help = "Slightly scramble buffers on every IO submit",
3261 .category = FIO_OPT_C_IO,
3262 .group = FIO_OPT_G_IO_BUF,
3265 .name = "buffer_pattern",
3266 .lname = "Buffer pattern",
3267 .type = FIO_OPT_STR,
3268 .cb = str_buffer_pattern_cb,
3269 .help = "Fill pattern for IO buffers",
3270 .category = FIO_OPT_C_IO,
3271 .group = FIO_OPT_G_IO_BUF,
3274 .name = "buffer_compress_percentage",
3275 .lname = "Buffer compression percentage",
3276 .type = FIO_OPT_INT,
3277 .cb = str_buffer_compress_cb,
3280 .help = "How compressible the buffer is (approximately)",
3282 .category = FIO_OPT_C_IO,
3283 .group = FIO_OPT_G_IO_BUF,
3286 .name = "buffer_compress_chunk",
3287 .lname = "Buffer compression chunk size",
3288 .type = FIO_OPT_INT,
3289 .off1 = td_var_offset(compress_chunk),
3290 .parent = "buffer_compress_percentage",
3292 .help = "Size of compressible region in buffer",
3294 .category = FIO_OPT_C_IO,
3295 .group = FIO_OPT_G_IO_BUF,
3298 .name = "dedupe_percentage",
3299 .lname = "Dedupe percentage",
3300 .type = FIO_OPT_INT,
3301 .cb = str_dedupe_cb,
3304 .help = "Percentage of buffers that are dedupable",
3306 .category = FIO_OPT_C_IO,
3307 .group = FIO_OPT_G_IO_BUF,
3310 .name = "clat_percentiles",
3311 .lname = "Completion latency percentiles",
3312 .type = FIO_OPT_BOOL,
3313 .off1 = td_var_offset(clat_percentiles),
3314 .help = "Enable the reporting of completion latency percentiles",
3316 .category = FIO_OPT_C_STAT,
3317 .group = FIO_OPT_G_INVALID,
3320 .name = "percentile_list",
3321 .lname = "Completion latency percentile list",
3322 .type = FIO_OPT_FLOAT_LIST,
3323 .off1 = td_var_offset(percentile_list),
3324 .off2 = td_var_offset(percentile_precision),
3325 .help = "Specify a custom list of percentiles to report",
3326 .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99",
3327 .maxlen = FIO_IO_U_LIST_MAX_LEN,
3330 .category = FIO_OPT_C_STAT,
3331 .group = FIO_OPT_G_INVALID,
3334 #ifdef FIO_HAVE_DISK_UTIL
3336 .name = "disk_util",
3337 .lname = "Disk utilization",
3338 .type = FIO_OPT_BOOL,
3339 .off1 = td_var_offset(do_disk_util),
3340 .help = "Log disk utilization statistics",
3342 .category = FIO_OPT_C_STAT,
3343 .group = FIO_OPT_G_INVALID,
3347 .name = "gtod_reduce",
3348 .lname = "Reduce gettimeofday() calls",
3349 .type = FIO_OPT_BOOL,
3350 .help = "Greatly reduce number of gettimeofday() calls",
3351 .cb = str_gtod_reduce_cb,
3354 .category = FIO_OPT_C_STAT,
3355 .group = FIO_OPT_G_INVALID,
3358 .name = "disable_lat",
3359 .lname = "Disable all latency stats",
3360 .type = FIO_OPT_BOOL,
3361 .off1 = td_var_offset(disable_lat),
3362 .help = "Disable latency numbers",
3363 .parent = "gtod_reduce",
3366 .category = FIO_OPT_C_STAT,
3367 .group = FIO_OPT_G_INVALID,
3370 .name = "disable_clat",
3371 .lname = "Disable completion latency stats",
3372 .type = FIO_OPT_BOOL,
3373 .off1 = td_var_offset(disable_clat),
3374 .help = "Disable completion latency numbers",