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)) {
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);
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;
291 static int str_ignore_error_cb(void *data, const char *input)
293 struct thread_data *td = data;
295 int type = 0, ret = 1;
300 p = str = strdup(input);
302 strip_blank_front(&str);
303 strip_blank_end(str);
309 ret = ignore_error_type(td, type, p);
319 static int str_rw_cb(void *data, const char *str)
321 struct thread_data *td = data;
322 struct thread_options *o = &td->o;
323 char *nr = get_opt_postfix(str);
335 o->ddir_seq_nr = atoi(nr);
339 if (str_to_decimal(nr, &val, 1, o)) {
340 log_err("fio: rw postfix parsing failed\n");
345 o->ddir_seq_add = val;
352 static int str_mem_cb(void *data, const char *mem)
354 struct thread_data *td = data;
356 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
357 td->o.mmapfile = get_opt_postfix(mem);
362 static int fio_clock_source_cb(void *data, const char *str)
364 struct thread_data *td = data;
366 fio_clock_source = td->o.clocksource;
367 fio_clock_source_set = 1;
372 static int str_rwmix_read_cb(void *data, unsigned long long *val)
374 struct thread_data *td = data;
376 td->o.rwmix[DDIR_READ] = *val;
377 td->o.rwmix[DDIR_WRITE] = 100 - *val;
381 static int str_rwmix_write_cb(void *data, unsigned long long *val)
383 struct thread_data *td = data;
385 td->o.rwmix[DDIR_WRITE] = *val;
386 td->o.rwmix[DDIR_READ] = 100 - *val;
390 static int str_exitall_cb(void)
392 exitall_on_terminate = 1;
396 #ifdef FIO_HAVE_CPU_AFFINITY
397 static int str_cpumask_cb(void *data, unsigned long long *val)
399 struct thread_data *td = data;
407 ret = fio_cpuset_init(&td->o.cpumask);
409 log_err("fio: cpuset_init failed\n");
410 td_verror(td, ret, "fio_cpuset_init");
414 max_cpu = cpus_online();
416 for (i = 0; i < sizeof(int) * 8; i++) {
417 if ((1 << i) & *val) {
419 log_err("fio: CPU %d too large (max=%ld)\n", i,
423 dprint(FD_PARSE, "set cpu allowed %d\n", i);
424 fio_cpu_set(&td->o.cpumask, i);
428 td->o.cpumask_set = 1;
432 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
439 ret = fio_cpuset_init(mask);
441 log_err("fio: cpuset_init failed\n");
442 td_verror(td, ret, "fio_cpuset_init");
446 p = str = strdup(input);
448 strip_blank_front(&str);
449 strip_blank_end(str);
451 max_cpu = cpus_online();
453 while ((cpu = strsep(&str, ",")) != NULL) {
462 while ((cpu2 = strsep(&str2, "-")) != NULL) {
472 while (icpu <= icpu2) {
473 if (icpu >= FIO_MAX_CPUS) {
474 log_err("fio: your OS only supports up to"
475 " %d CPUs\n", (int) FIO_MAX_CPUS);
479 if (icpu > max_cpu) {
480 log_err("fio: CPU %d too large (max=%ld)\n",
486 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
487 fio_cpu_set(mask, icpu);
496 td->o.cpumask_set = 1;
500 static int str_cpus_allowed_cb(void *data, const char *input)
502 struct thread_data *td = data;
508 ret = set_cpus_allowed(td, &td->o.cpumask, input);
510 td->o.cpumask_set = 1;
515 static int str_verify_cpus_allowed_cb(void *data, const char *input)
517 struct thread_data *td = data;
520 ret = set_cpus_allowed(td, &td->o.verify_cpumask, input);
522 td->o.verify_cpumask_set = 1;
528 #ifdef CONFIG_LIBNUMA
529 static int str_numa_cpunodes_cb(void *data, char *input)
531 struct thread_data *td = data;
536 /* numa_parse_nodestring() parses a character string list
537 * of nodes into a bit mask. The bit mask is allocated by
538 * numa_allocate_nodemask(), so it should be freed by
539 * numa_free_nodemask().
541 td->o.numa_cpunodesmask = numa_parse_nodestring(input);
542 if (td->o.numa_cpunodesmask == NULL) {
543 log_err("fio: numa_parse_nodestring failed\n");
544 td_verror(td, 1, "str_numa_cpunodes_cb");
548 td->o.numa_cpumask_set = 1;
552 static int str_numa_mpol_cb(void *data, char *input)
554 struct thread_data *td = data;
555 const char * const policy_types[] =
556 { "default", "prefer", "bind", "interleave", "local", NULL };
563 nodelist = strchr(input, ':');
565 /* NUL-terminate mode */
569 for (i = 0; i <= MPOL_LOCAL; i++) {
570 if (!strcmp(input, policy_types[i])) {
571 td->o.numa_mem_mode = i;
575 if (i > MPOL_LOCAL) {
576 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
580 switch (td->o.numa_mem_mode) {
583 * Insist on a nodelist of one node only
586 char *rest = nodelist;
587 while (isdigit(*rest))
590 log_err("fio: one node only for \'prefer\'\n");
594 log_err("fio: one node is needed for \'prefer\'\n");
598 case MPOL_INTERLEAVE:
600 * Default to online nodes with memory if no nodelist
603 nodelist = strdup("all");
608 * Don't allow a nodelist
611 log_err("fio: NO nodelist for \'local\'\n");
617 * Insist on a nodelist
620 log_err("fio: a nodelist is needed for \'bind\'\n");
627 /* numa_parse_nodestring() parses a character string list
628 * of nodes into a bit mask. The bit mask is allocated by
629 * numa_allocate_nodemask(), so it should be freed by
630 * numa_free_nodemask().
632 switch (td->o.numa_mem_mode) {
634 td->o.numa_mem_prefer_node = atoi(nodelist);
636 case MPOL_INTERLEAVE:
638 td->o.numa_memnodesmask = numa_parse_nodestring(nodelist);
639 if (td->o.numa_memnodesmask == NULL) {
640 log_err("fio: numa_parse_nodestring failed\n");
641 td_verror(td, 1, "str_numa_memnodes_cb");
651 td->o.numa_memmask_set = 1;
659 static int str_fst_cb(void *data, const char *str)
661 struct thread_data *td = data;
662 char *nr = get_opt_postfix(str);
664 td->file_service_nr = 1;
666 td->file_service_nr = atoi(nr);
673 #ifdef CONFIG_SYNC_FILE_RANGE
674 static int str_sfr_cb(void *data, const char *str)
676 struct thread_data *td = data;
677 char *nr = get_opt_postfix(str);
679 td->sync_file_range_nr = 1;
681 td->sync_file_range_nr = atoi(nr);
689 static int str_random_distribution_cb(void *data, const char *str)
691 struct thread_data *td = data;
698 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
700 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
705 nr = get_opt_postfix(str);
706 if (nr && !str_to_float(nr, &val)) {
707 log_err("fio: random postfix parsing failed\n");
714 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
716 log_err("fio: zipf theta must different than 1.0\n");
719 td->o.zipf_theta.u.f = val;
721 if (val <= 0.00 || val >= 1.00) {
722 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
725 td->o.pareto_h.u.f = val;
732 * Return next file in the string. Files are separated with ':'. If the ':'
733 * is escaped with a '\', then that ':' is part of the filename and does not
734 * indicate a new file.
736 static char *get_next_file_name(char **ptr)
741 if (!str || !strlen(str))
747 * No colon, we are done
749 p = strchr(str, ':');
756 * We got a colon, but it's the first character. Skip and
764 if (*(p - 1) != '\\') {
770 memmove(p - 1, p, strlen(p) + 1);
777 static int str_filename_cb(void *data, const char *input)
779 struct thread_data *td = data;
780 char *fname, *str, *p;
782 p = str = strdup(input);
784 strip_blank_front(&str);
785 strip_blank_end(str);
787 if (!td->files_index)
790 while ((fname = get_next_file_name(&str)) != NULL) {
801 static int str_directory_cb(void *data, const char fio_unused *str)
803 struct thread_data *td = data;
809 if (lstat(td->o.directory, &sb) < 0) {
812 log_err("fio: %s is not a directory\n", td->o.directory);
813 td_verror(td, ret, "lstat");
816 if (!S_ISDIR(sb.st_mode)) {
817 log_err("fio: %s is not a directory\n", td->o.directory);
824 static int str_lockfile_cb(void *data, const char fio_unused *str)
826 struct thread_data *td = data;
828 if (td->files_index) {
829 log_err("fio: lockfile= option must precede filename=\n");
836 static int str_opendir_cb(void *data, const char fio_unused *str)
838 struct thread_data *td = data;
843 if (!td->files_index)
846 return add_dir_files(td, td->o.opendir);
849 static int pattern_cb(char *pattern, unsigned int max_size,
850 const char *input, unsigned int *pattern_bytes)
853 int i = 0, j = 0, len, k, base = 10;
854 uint32_t pattern_length;
857 loc1 = strstr(input, "0x");
858 loc2 = strstr(input, "0X");
861 off = strtol(input, NULL, base);
862 if (off != LONG_MAX || errno != ERANGE) {
864 pattern[i] = off & 0xff;
873 j = loc1 - input + 2;
875 j = loc2 - input + 2;
878 if (len - j < max_size * 2) {
880 off = converthexchartoint(input[k--]);
882 off += (converthexchartoint(input[k--])
884 pattern[i++] = (char) off;
890 * Fill the pattern all the way to the end. This greatly reduces
891 * the number of memcpy's we have to do when verifying the IO.
894 while (i > 1 && i * 2 <= max_size) {
895 memcpy(&pattern[i], &pattern[0], i);
900 * Fill remainder, if the pattern multiple ends up not being
903 while (i > 1 && i < max_size) {
904 unsigned int b = min(pattern_length, max_size - i);
906 memcpy(&pattern[i], &pattern[0], b);
912 * The code in verify_io_u_pattern assumes a single byte pattern
913 * fills the whole verify pattern buffer.
915 memset(pattern, pattern[0], max_size);
922 static int str_buffer_pattern_cb(void *data, const char *input)
924 struct thread_data *td = data;
927 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
928 &td->o.buffer_pattern_bytes);
931 td->o.refill_buffers = 0;
932 td->o.scramble_buffers = 0;
933 td->o.zero_buffers = 0;
939 static int str_verify_pattern_cb(void *data, const char *input)
941 struct thread_data *td = data;
944 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
945 &td->o.verify_pattern_bytes);
948 * VERIFY_META could already be set
950 if (!ret && td->o.verify == VERIFY_NONE)
951 td->o.verify = VERIFY_PATTERN;
956 static int str_gtod_reduce_cb(void *data, int *il)
958 struct thread_data *td = data;
961 td->o.disable_lat = !!val;
962 td->o.disable_clat = !!val;
963 td->o.disable_slat = !!val;
964 td->o.disable_bw = !!val;
965 td->o.clat_percentiles = !val;
967 td->tv_cache_mask = 63;
972 static int str_gtod_cpu_cb(void *data, long long *il)
974 struct thread_data *td = data;
977 td->o.gtod_cpu = val;
978 td->o.gtod_offload = 1;
982 static int str_size_cb(void *data, unsigned long long *__val)
984 struct thread_data *td = data;
985 unsigned long long v = *__val;
987 if (parse_is_percent(v)) {
989 td->o.size_percent = -1ULL - v;
996 static int rw_verify(struct fio_option *o, void *data)
998 struct thread_data *td = data;
1000 if (read_only && td_write(td)) {
1001 log_err("fio: job <%s> has write bit set, but fio is in"
1002 " read-only mode\n", td->o.name);
1009 static int gtod_cpu_verify(struct fio_option *o, void *data)
1011 #ifndef FIO_HAVE_CPU_AFFINITY
1012 struct thread_data *td = data;
1014 if (td->o.gtod_cpu) {
1015 log_err("fio: platform must support CPU affinity for"
1016 "gettimeofday() offloading\n");
1027 static struct opt_group fio_opt_groups[] = {
1030 .mask = FIO_OPT_C_GENERAL,
1034 .mask = FIO_OPT_C_IO,
1038 .mask = FIO_OPT_C_FILE,
1041 .name = "Statistics",
1042 .mask = FIO_OPT_C_STAT,
1046 .mask = FIO_OPT_C_LOG,
1050 .mask = FIO_OPT_C_PROFILE,
1057 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1058 unsigned int inv_mask)
1060 struct opt_group *og;
1063 if (*mask == inv_mask || !*mask)
1066 for (i = 0; ogs[i].name; i++) {
1069 if (*mask & og->mask) {
1070 *mask &= ~(og->mask);
1078 struct opt_group *opt_group_from_mask(unsigned int *mask)
1080 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1083 static struct opt_group fio_opt_cat_groups[] = {
1085 .name = "Latency profiling",
1086 .mask = FIO_OPT_G_LATPROF,
1090 .mask = FIO_OPT_G_RATE,
1094 .mask = FIO_OPT_G_ZONE,
1097 .name = "Read/write mix",
1098 .mask = FIO_OPT_G_RWMIX,
1102 .mask = FIO_OPT_G_VERIFY,
1106 .mask = FIO_OPT_G_TRIM,
1109 .name = "I/O Logging",
1110 .mask = FIO_OPT_G_IOLOG,
1113 .name = "I/O Depth",
1114 .mask = FIO_OPT_G_IO_DEPTH,
1118 .mask = FIO_OPT_G_IO_FLOW,
1121 .name = "Description",
1122 .mask = FIO_OPT_G_DESC,
1126 .mask = FIO_OPT_G_FILENAME,
1129 .name = "General I/O",
1130 .mask = FIO_OPT_G_IO_BASIC,
1134 .mask = FIO_OPT_G_CGROUP,
1138 .mask = FIO_OPT_G_RUNTIME,
1142 .mask = FIO_OPT_G_PROCESS,
1145 .name = "Job credentials / priority",
1146 .mask = FIO_OPT_G_CRED,
1149 .name = "Clock settings",
1150 .mask = FIO_OPT_G_CLOCK,
1154 .mask = FIO_OPT_G_IO_TYPE,
1157 .name = "I/O Thinktime",
1158 .mask = FIO_OPT_G_THINKTIME,
1161 .name = "Randomizations",
1162 .mask = FIO_OPT_G_RANDOM,
1165 .name = "I/O buffers",
1166 .mask = FIO_OPT_G_IO_BUF,
1169 .name = "Tiobench profile",
1170 .mask = FIO_OPT_G_TIOBENCH,
1178 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1180 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1184 * Map of job/command line options
1186 struct fio_option fio_options[FIO_MAX_OPTS] = {
1188 .name = "description",
1189 .lname = "Description of job",
1190 .type = FIO_OPT_STR_STORE,
1191 .off1 = td_var_offset(description),
1192 .help = "Text job description",
1193 .category = FIO_OPT_C_GENERAL,
1194 .group = FIO_OPT_G_DESC,
1198 .lname = "Job name",
1199 .type = FIO_OPT_STR_STORE,
1200 .off1 = td_var_offset(name),
1201 .help = "Name of this job",
1202 .category = FIO_OPT_C_GENERAL,
1203 .group = FIO_OPT_G_DESC,
1207 .lname = "Filename(s)",
1208 .type = FIO_OPT_STR_STORE,
1209 .off1 = td_var_offset(filename),
1210 .cb = str_filename_cb,
1211 .prio = -1, /* must come after "directory" */
1212 .help = "File(s) to use for the workload",
1213 .category = FIO_OPT_C_FILE,
1214 .group = FIO_OPT_G_FILENAME,
1217 .name = "directory",
1218 .lname = "Directory",
1219 .type = FIO_OPT_STR_STORE,
1220 .off1 = td_var_offset(directory),
1221 .cb = str_directory_cb,
1222 .help = "Directory to store files in",
1223 .category = FIO_OPT_C_FILE,
1224 .group = FIO_OPT_G_FILENAME,
1227 .name = "filename_format",
1228 .type = FIO_OPT_STR_STORE,
1229 .off1 = td_var_offset(filename_format),
1230 .prio = -1, /* must come after "directory" */
1231 .help = "Override default $jobname.$jobnum.$filenum naming",
1232 .def = "$jobname.$jobnum.$filenum",
1233 .category = FIO_OPT_C_FILE,
1234 .group = FIO_OPT_G_FILENAME,
1238 .lname = "Lockfile",
1239 .type = FIO_OPT_STR,
1240 .off1 = td_var_offset(file_lock_mode),
1241 .help = "Lock file when doing IO to it",
1243 .parent = "filename",
1246 .cb = str_lockfile_cb,
1247 .category = FIO_OPT_C_FILE,
1248 .group = FIO_OPT_G_FILENAME,
1251 .oval = FILE_LOCK_NONE,
1252 .help = "No file locking",
1254 { .ival = "exclusive",
1255 .oval = FILE_LOCK_EXCLUSIVE,
1256 .help = "Exclusive file lock",
1259 .ival = "readwrite",
1260 .oval = FILE_LOCK_READWRITE,
1261 .help = "Read vs write lock",
1267 .lname = "Open directory",
1268 .type = FIO_OPT_STR_STORE,
1269 .off1 = td_var_offset(opendir),
1270 .cb = str_opendir_cb,
1271 .help = "Recursively add files from this directory and down",
1272 .category = FIO_OPT_C_FILE,
1273 .group = FIO_OPT_G_FILENAME,
1277 .lname = "Read/write",
1278 .alias = "readwrite",
1279 .type = FIO_OPT_STR,
1281 .off1 = td_var_offset(td_ddir),
1282 .help = "IO direction",
1284 .verify = rw_verify,
1285 .category = FIO_OPT_C_IO,
1286 .group = FIO_OPT_G_IO_BASIC,
1289 .oval = TD_DDIR_READ,
1290 .help = "Sequential read",
1293 .oval = TD_DDIR_WRITE,
1294 .help = "Sequential write",
1297 .oval = TD_DDIR_TRIM,
1298 .help = "Sequential trim",
1300 { .ival = "randread",
1301 .oval = TD_DDIR_RANDREAD,
1302 .help = "Random read",
1304 { .ival = "randwrite",
1305 .oval = TD_DDIR_RANDWRITE,
1306 .help = "Random write",
1308 { .ival = "randtrim",
1309 .oval = TD_DDIR_RANDTRIM,
1310 .help = "Random trim",
1314 .help = "Sequential read and write mix",
1316 { .ival = "readwrite",
1318 .help = "Sequential read and write mix",
1321 .oval = TD_DDIR_RANDRW,
1322 .help = "Random read and write mix"
1327 .name = "rw_sequencer",
1328 .lname = "RW Sequencer",
1329 .type = FIO_OPT_STR,
1330 .off1 = td_var_offset(rw_seq),
1331 .help = "IO offset generator modifier",
1332 .def = "sequential",
1333 .category = FIO_OPT_C_IO,
1334 .group = FIO_OPT_G_IO_BASIC,
1336 { .ival = "sequential",
1338 .help = "Generate sequential offsets",
1340 { .ival = "identical",
1341 .oval = RW_SEQ_IDENT,
1342 .help = "Generate identical offsets",
1349 .lname = "IO Engine",
1350 .type = FIO_OPT_STR_STORE,
1351 .off1 = td_var_offset(ioengine),
1352 .help = "IO engine to use",
1353 .def = FIO_PREFERRED_ENGINE,
1354 .category = FIO_OPT_C_IO,
1355 .group = FIO_OPT_G_IO_BASIC,
1358 .help = "Use read/write",
1361 .help = "Use pread/pwrite",
1364 .help = "Use readv/writev",
1366 #ifdef CONFIG_PWRITEV
1368 .help = "Use preadv/pwritev",
1371 #ifdef CONFIG_LIBAIO
1373 .help = "Linux native asynchronous IO",
1376 #ifdef CONFIG_POSIXAIO
1377 { .ival = "posixaio",
1378 .help = "POSIX asynchronous IO",
1381 #ifdef CONFIG_SOLARISAIO
1382 { .ival = "solarisaio",
1383 .help = "Solaris native asynchronous IO",
1386 #ifdef CONFIG_WINDOWSAIO
1387 { .ival = "windowsaio",
1388 .help = "Windows native asynchronous IO"
1392 .help = "Memory mapped IO"
1394 #ifdef CONFIG_LINUX_SPLICE
1396 .help = "splice/vmsplice based IO",
1398 { .ival = "netsplice",
1399 .help = "splice/vmsplice to/from the network",
1402 #ifdef FIO_HAVE_SGIO
1404 .help = "SCSI generic v3 IO",
1408 .help = "Testing engine (no data transfer)",
1411 .help = "Network IO",
1414 .help = "CPU cycle burner engine",
1418 .help = "GUASI IO engine",
1421 #ifdef FIO_HAVE_BINJECT
1422 { .ival = "binject",
1423 .help = "binject direct inject block engine",
1428 .help = "RDMA IO engine",
1431 #ifdef CONFIG_FUSION_AW
1432 { .ival = "fusion-aw-sync",
1433 .help = "Fusion-io atomic write engine",
1436 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1437 { .ival = "e4defrag",
1438 .help = "ext4 defrag engine",
1441 #ifdef CONFIG_LINUX_FALLOCATE
1443 .help = "fallocate() file based engine",
1446 { .ival = "external",
1447 .help = "Load external engine (append name)",
1453 .lname = "IO Depth",
1454 .type = FIO_OPT_INT,
1455 .off1 = td_var_offset(iodepth),
1456 .help = "Number of IO buffers to keep in flight",
1460 .category = FIO_OPT_C_IO,
1461 .group = FIO_OPT_G_IO_BASIC,
1464 .name = "iodepth_batch",
1465 .lname = "IO Depth batch",
1466 .alias = "iodepth_batch_submit",
1467 .type = FIO_OPT_INT,
1468 .off1 = td_var_offset(iodepth_batch),
1469 .help = "Number of IO buffers to submit in one go",
1470 .parent = "iodepth",
1475 .category = FIO_OPT_C_IO,
1476 .group = FIO_OPT_G_IO_BASIC,
1479 .name = "iodepth_batch_complete",
1480 .lname = "IO Depth batch complete",
1481 .type = FIO_OPT_INT,
1482 .off1 = td_var_offset(iodepth_batch_complete),
1483 .help = "Number of IO buffers to retrieve in one go",
1484 .parent = "iodepth",
1489 .category = FIO_OPT_C_IO,
1490 .group = FIO_OPT_G_IO_BASIC,
1493 .name = "iodepth_low",
1494 .lname = "IO Depth batch low",
1495 .type = FIO_OPT_INT,
1496 .off1 = td_var_offset(iodepth_low),
1497 .help = "Low water mark for queuing depth",
1498 .parent = "iodepth",
1501 .category = FIO_OPT_C_IO,
1502 .group = FIO_OPT_G_IO_BASIC,
1507 .type = FIO_OPT_STR_VAL,
1509 .help = "Total size of device or files",
1510 .interval = 1024 * 1024,
1511 .category = FIO_OPT_C_IO,
1512 .group = FIO_OPT_G_INVALID,
1515 .name = "fill_device",
1516 .lname = "Fill device",
1518 .type = FIO_OPT_BOOL,
1519 .off1 = td_var_offset(fill_device),
1520 .help = "Write until an ENOSPC error occurs",
1522 .category = FIO_OPT_C_FILE,
1523 .group = FIO_OPT_G_INVALID,
1527 .lname = "File size",
1528 .type = FIO_OPT_STR_VAL,
1529 .off1 = td_var_offset(file_size_low),
1530 .off2 = td_var_offset(file_size_high),
1532 .help = "Size of individual files",
1533 .interval = 1024 * 1024,
1534 .category = FIO_OPT_C_FILE,
1535 .group = FIO_OPT_G_INVALID,
1539 .lname = "IO offset",
1540 .alias = "fileoffset",
1541 .type = FIO_OPT_STR_VAL,
1542 .off1 = td_var_offset(start_offset),
1543 .help = "Start IO from this offset",
1545 .interval = 1024 * 1024,
1546 .category = FIO_OPT_C_IO,
1547 .group = FIO_OPT_G_INVALID,
1550 .name = "offset_increment",
1551 .lname = "IO offset increment",
1552 .type = FIO_OPT_STR_VAL,
1553 .off1 = td_var_offset(offset_increment),
1554 .help = "What is the increment from one offset to the next",
1558 .interval = 1024 * 1024,
1559 .category = FIO_OPT_C_IO,
1560 .group = FIO_OPT_G_INVALID,
1563 .name = "number_ios",
1564 .lname = "Number of IOs to perform",
1565 .type = FIO_OPT_STR_VAL,
1566 .off1 = td_var_offset(number_ios),
1567 .help = "Force job completion of this number of IOs",
1569 .category = FIO_OPT_C_IO,
1570 .group = FIO_OPT_G_INVALID,
1574 .lname = "Block size",
1575 .alias = "blocksize",
1576 .type = FIO_OPT_INT,
1577 .off1 = td_var_offset(bs[DDIR_READ]),
1578 .off2 = td_var_offset(bs[DDIR_WRITE]),
1579 .off3 = td_var_offset(bs[DDIR_TRIM]),
1581 .help = "Block size unit",
1586 .category = FIO_OPT_C_IO,
1587 .group = FIO_OPT_G_INVALID,
1591 .lname = "Block size align",
1592 .alias = "blockalign",
1593 .type = FIO_OPT_INT,
1594 .off1 = td_var_offset(ba[DDIR_READ]),
1595 .off2 = td_var_offset(ba[DDIR_WRITE]),
1596 .off3 = td_var_offset(ba[DDIR_TRIM]),
1598 .help = "IO block offset alignment",
1602 .category = FIO_OPT_C_IO,
1603 .group = FIO_OPT_G_INVALID,
1607 .lname = "Block size range",
1608 .alias = "blocksize_range",
1609 .type = FIO_OPT_RANGE,
1610 .off1 = td_var_offset(min_bs[DDIR_READ]),
1611 .off2 = td_var_offset(max_bs[DDIR_READ]),
1612 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1613 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1614 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1615 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1617 .help = "Set block size range (in more detail than bs)",
1621 .category = FIO_OPT_C_IO,
1622 .group = FIO_OPT_G_INVALID,
1626 .lname = "Block size split",
1627 .type = FIO_OPT_STR,
1628 .cb = str_bssplit_cb,
1629 .help = "Set a specific mix of block sizes",
1632 .category = FIO_OPT_C_IO,
1633 .group = FIO_OPT_G_INVALID,
1636 .name = "bs_unaligned",
1637 .lname = "Block size unaligned",
1638 .alias = "blocksize_unaligned",
1639 .type = FIO_OPT_STR_SET,
1640 .off1 = td_var_offset(bs_unaligned),
1641 .help = "Don't sector align IO buffer sizes",
1644 .category = FIO_OPT_C_IO,
1645 .group = FIO_OPT_G_INVALID,
1648 .name = "bs_is_seq_rand",
1649 .lname = "Block size division is seq/random (not read/write)",
1650 .type = FIO_OPT_BOOL,
1651 .off1 = td_var_offset(bs_is_seq_rand),
1652 .help = "Consider any blocksize setting to be sequential,ramdom",
1654 .parent = "blocksize",
1655 .category = FIO_OPT_C_IO,
1656 .group = FIO_OPT_G_INVALID,
1659 .name = "randrepeat",
1660 .lname = "Random repeatable",
1661 .type = FIO_OPT_BOOL,
1662 .off1 = td_var_offset(rand_repeatable),
1663 .help = "Use repeatable random IO pattern",
1667 .category = FIO_OPT_C_IO,
1668 .group = FIO_OPT_G_RANDOM,
1672 .lname = "The random generator seed",
1673 .type = FIO_OPT_STR_VAL,
1674 .off1 = td_var_offset(rand_seed),
1675 .help = "Set the random generator seed value",
1677 .category = FIO_OPT_C_IO,
1678 .group = FIO_OPT_G_RANDOM,
1681 .name = "use_os_rand",
1682 .lname = "Use OS random",
1683 .type = FIO_OPT_BOOL,
1684 .off1 = td_var_offset(use_os_rand),
1685 .help = "Set to use OS random generator",
1689 .category = FIO_OPT_C_IO,
1690 .group = FIO_OPT_G_RANDOM,
1693 .name = "norandommap",
1694 .lname = "No randommap",
1695 .type = FIO_OPT_STR_SET,
1696 .off1 = td_var_offset(norandommap),
1697 .help = "Accept potential duplicate random blocks",
1701 .category = FIO_OPT_C_IO,
1702 .group = FIO_OPT_G_RANDOM,
1705 .name = "softrandommap",
1706 .lname = "Soft randommap",
1707 .type = FIO_OPT_BOOL,
1708 .off1 = td_var_offset(softrandommap),
1709 .help = "Set norandommap if randommap allocation fails",
1710 .parent = "norandommap",
1713 .category = FIO_OPT_C_IO,
1714 .group = FIO_OPT_G_RANDOM,
1717 .name = "random_generator",
1718 .type = FIO_OPT_STR,
1719 .off1 = td_var_offset(random_generator),
1720 .help = "Type of random number generator to use",
1721 .def = "tausworthe",
1723 { .ival = "tausworthe",
1724 .oval = FIO_RAND_GEN_TAUSWORTHE,
1725 .help = "Strong Tausworthe generator",
1728 .oval = FIO_RAND_GEN_LFSR,
1729 .help = "Variable length LFSR",
1732 .category = FIO_OPT_C_IO,
1733 .group = FIO_OPT_G_RANDOM,
1736 .name = "random_distribution",
1737 .type = FIO_OPT_STR,
1738 .off1 = td_var_offset(random_distribution),
1739 .cb = str_random_distribution_cb,
1740 .help = "Random offset distribution generator",
1744 .oval = FIO_RAND_DIST_RANDOM,
1745 .help = "Completely random",
1748 .oval = FIO_RAND_DIST_ZIPF,
1749 .help = "Zipf distribution",
1752 .oval = FIO_RAND_DIST_PARETO,
1753 .help = "Pareto distribution",
1756 .category = FIO_OPT_C_IO,
1757 .group = FIO_OPT_G_RANDOM,
1760 .name = "percentage_random",
1761 .lname = "Percentage Random",
1762 .type = FIO_OPT_INT,
1763 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1764 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1765 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1767 .help = "Percentage of seq/random mix that should be random",
1768 .def = "100,100,100",
1770 .inverse = "percentage_sequential",
1771 .category = FIO_OPT_C_IO,
1772 .group = FIO_OPT_G_RANDOM,
1775 .name = "percentage_sequential",
1776 .lname = "Percentage Sequential",
1777 .type = FIO_OPT_DEPRECATED,
1778 .category = FIO_OPT_C_IO,
1779 .group = FIO_OPT_G_RANDOM,
1783 .lname = "Number of files",
1784 .alias = "nr_files",
1785 .type = FIO_OPT_INT,
1786 .off1 = td_var_offset(nr_files),
1787 .help = "Split job workload between this number of files",
1790 .category = FIO_OPT_C_FILE,
1791 .group = FIO_OPT_G_INVALID,
1794 .name = "openfiles",
1795 .lname = "Number of open files",
1796 .type = FIO_OPT_INT,
1797 .off1 = td_var_offset(open_files),
1798 .help = "Number of files to keep open at the same time",
1799 .category = FIO_OPT_C_FILE,
1800 .group = FIO_OPT_G_INVALID,
1803 .name = "file_service_type",
1804 .lname = "File service type",
1805 .type = FIO_OPT_STR,
1807 .off1 = td_var_offset(file_service_type),
1808 .help = "How to select which file to service next",
1809 .def = "roundrobin",
1810 .category = FIO_OPT_C_FILE,
1811 .group = FIO_OPT_G_INVALID,
1814 .oval = FIO_FSERVICE_RANDOM,
1815 .help = "Choose a file at random",
1817 { .ival = "roundrobin",
1818 .oval = FIO_FSERVICE_RR,
1819 .help = "Round robin select files",
1821 { .ival = "sequential",
1822 .oval = FIO_FSERVICE_SEQ,
1823 .help = "Finish one file before moving to the next",
1826 .parent = "nrfiles",
1829 #ifdef CONFIG_POSIX_FALLOCATE
1831 .name = "fallocate",
1832 .lname = "Fallocate",
1833 .type = FIO_OPT_STR,
1834 .off1 = td_var_offset(fallocate_mode),
1835 .help = "Whether pre-allocation is performed when laying out files",
1837 .category = FIO_OPT_C_FILE,
1838 .group = FIO_OPT_G_INVALID,
1841 .oval = FIO_FALLOCATE_NONE,
1842 .help = "Do not pre-allocate space",
1845 .oval = FIO_FALLOCATE_POSIX,
1846 .help = "Use posix_fallocate()",
1848 #ifdef CONFIG_LINUX_FALLOCATE
1850 .oval = FIO_FALLOCATE_KEEP_SIZE,
1851 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
1854 /* Compatibility with former boolean values */
1856 .oval = FIO_FALLOCATE_NONE,
1857 .help = "Alias for 'none'",
1860 .oval = FIO_FALLOCATE_POSIX,
1861 .help = "Alias for 'posix'",
1865 #endif /* CONFIG_POSIX_FALLOCATE */
1867 .name = "fadvise_hint",
1868 .lname = "Fadvise hint",
1869 .type = FIO_OPT_BOOL,
1870 .off1 = td_var_offset(fadvise_hint),
1871 .help = "Use fadvise() to advise the kernel on IO pattern",
1873 .category = FIO_OPT_C_FILE,
1874 .group = FIO_OPT_G_INVALID,
1879 .type = FIO_OPT_INT,
1880 .off1 = td_var_offset(fsync_blocks),
1881 .help = "Issue fsync for writes every given number of blocks",
1884 .category = FIO_OPT_C_FILE,
1885 .group = FIO_OPT_G_INVALID,
1888 .name = "fdatasync",
1889 .lname = "Fdatasync",
1890 .type = FIO_OPT_INT,
1891 .off1 = td_var_offset(fdatasync_blocks),
1892 .help = "Issue fdatasync for writes every given number of blocks",
1895 .category = FIO_OPT_C_FILE,
1896 .group = FIO_OPT_G_INVALID,
1899 .name = "write_barrier",
1900 .lname = "Write barrier",
1901 .type = FIO_OPT_INT,
1902 .off1 = td_var_offset(barrier_blocks),
1903 .help = "Make every Nth write a barrier write",
1906 .category = FIO_OPT_C_IO,
1907 .group = FIO_OPT_G_INVALID,
1909 #ifdef CONFIG_SYNC_FILE_RANGE
1911 .name = "sync_file_range",
1912 .lname = "Sync file range",
1914 { .ival = "wait_before",
1915 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
1916 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
1920 .oval = SYNC_FILE_RANGE_WRITE,
1921 .help = "SYNC_FILE_RANGE_WRITE",
1925 .ival = "wait_after",
1926 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
1927 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
1931 .type = FIO_OPT_STR_MULTI,
1933 .off1 = td_var_offset(sync_file_range),
1934 .help = "Use sync_file_range()",
1935 .category = FIO_OPT_C_FILE,
1936 .group = FIO_OPT_G_INVALID,
1941 .lname = "Direct I/O",
1942 .type = FIO_OPT_BOOL,
1943 .off1 = td_var_offset(odirect),
1944 .help = "Use O_DIRECT IO (negates buffered)",
1946 .inverse = "buffered",
1947 .category = FIO_OPT_C_IO,
1948 .group = FIO_OPT_G_IO_TYPE,
1952 .lname = "Atomic I/O",
1953 .type = FIO_OPT_BOOL,
1954 .off1 = td_var_offset(oatomic),
1955 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
1957 .category = FIO_OPT_C_IO,
1958 .group = FIO_OPT_G_IO_TYPE,
1962 .lname = "Buffered I/O",
1963 .type = FIO_OPT_BOOL,
1964 .off1 = td_var_offset(odirect),
1966 .help = "Use buffered IO (negates direct)",
1968 .inverse = "direct",
1969 .category = FIO_OPT_C_IO,
1970 .group = FIO_OPT_G_IO_TYPE,
1973 .name = "overwrite",
1974 .lname = "Overwrite",
1975 .type = FIO_OPT_BOOL,
1976 .off1 = td_var_offset(overwrite),
1977 .help = "When writing, set whether to overwrite current data",
1979 .category = FIO_OPT_C_FILE,
1980 .group = FIO_OPT_G_INVALID,
1985 .type = FIO_OPT_INT,
1986 .off1 = td_var_offset(loops),
1987 .help = "Number of times to run the job",
1990 .category = FIO_OPT_C_GENERAL,
1991 .group = FIO_OPT_G_RUNTIME,
1995 .lname = "Number of jobs",
1996 .type = FIO_OPT_INT,
1997 .off1 = td_var_offset(numjobs),
1998 .help = "Duplicate this job this many times",
2001 .category = FIO_OPT_C_GENERAL,
2002 .group = FIO_OPT_G_RUNTIME,
2005 .name = "startdelay",
2006 .lname = "Start delay",
2007 .type = FIO_OPT_STR_VAL_TIME,
2008 .off1 = td_var_offset(start_delay),
2009 .help = "Only start job when this period has passed",
2011 .category = FIO_OPT_C_GENERAL,
2012 .group = FIO_OPT_G_RUNTIME,
2018 .type = FIO_OPT_STR_VAL_TIME,
2019 .off1 = td_var_offset(timeout),
2020 .help = "Stop workload when this amount of time has passed",
2022 .category = FIO_OPT_C_GENERAL,
2023 .group = FIO_OPT_G_RUNTIME,
2026 .name = "time_based",
2027 .lname = "Time based",
2028 .type = FIO_OPT_STR_SET,
2029 .off1 = td_var_offset(time_based),
2030 .help = "Keep running until runtime/timeout is met",
2031 .category = FIO_OPT_C_GENERAL,
2032 .group = FIO_OPT_G_RUNTIME,
2035 .name = "verify_only",
2036 .lname = "Verify only",
2037 .type = FIO_OPT_STR_SET,
2038 .off1 = td_var_offset(verify_only),
2039 .help = "Verifies previously written data is still valid",
2040 .category = FIO_OPT_C_GENERAL,
2041 .group = FIO_OPT_G_RUNTIME,
2044 .name = "ramp_time",
2045 .lname = "Ramp time",
2046 .type = FIO_OPT_STR_VAL_TIME,
2047 .off1 = td_var_offset(ramp_time),
2048 .help = "Ramp up time before measuring performance",
2049 .category = FIO_OPT_C_GENERAL,
2050 .group = FIO_OPT_G_RUNTIME,
2053 .name = "clocksource",
2054 .lname = "Clock source",
2055 .type = FIO_OPT_STR,
2056 .cb = fio_clock_source_cb,
2057 .off1 = td_var_offset(clocksource),
2058 .help = "What type of timing source to use",
2059 .category = FIO_OPT_C_GENERAL,
2060 .group = FIO_OPT_G_CLOCK,
2062 #ifdef CONFIG_GETTIMEOFDAY
2063 { .ival = "gettimeofday",
2065 .help = "Use gettimeofday(2) for timing",
2068 #ifdef CONFIG_CLOCK_GETTIME
2069 { .ival = "clock_gettime",
2070 .oval = CS_CGETTIME,
2071 .help = "Use clock_gettime(2) for timing",
2074 #ifdef ARCH_HAVE_CPU_CLOCK
2076 .oval = CS_CPUCLOCK,
2077 .help = "Use CPU private clock",
2085 .lname = "I/O Memory",
2086 .type = FIO_OPT_STR,
2088 .off1 = td_var_offset(mem_type),
2089 .help = "Backing type for IO buffers",
2091 .category = FIO_OPT_C_IO,
2092 .group = FIO_OPT_G_INVALID,
2096 .help = "Use malloc(3) for IO buffers",
2100 .help = "Use shared memory segments for IO buffers",
2102 #ifdef FIO_HAVE_HUGETLB
2103 { .ival = "shmhuge",
2104 .oval = MEM_SHMHUGE,
2105 .help = "Like shm, but use huge pages",
2110 .help = "Use mmap(2) (file or anon) for IO buffers",
2112 #ifdef FIO_HAVE_HUGETLB
2113 { .ival = "mmaphuge",
2114 .oval = MEM_MMAPHUGE,
2115 .help = "Like mmap, but use huge pages",
2121 .name = "iomem_align",
2122 .alias = "mem_align",
2123 .lname = "I/O memory alignment",
2124 .type = FIO_OPT_INT,
2125 .off1 = td_var_offset(mem_align),
2127 .help = "IO memory buffer offset alignment",
2131 .category = FIO_OPT_C_IO,
2132 .group = FIO_OPT_G_INVALID,
2137 .type = FIO_OPT_STR,
2138 .off1 = td_var_offset(verify),
2139 .help = "Verify data written",
2141 .category = FIO_OPT_C_IO,
2142 .group = FIO_OPT_G_VERIFY,
2145 .oval = VERIFY_NONE,
2146 .help = "Don't do IO verification",
2150 .help = "Use md5 checksums for verification",
2153 .oval = VERIFY_CRC64,
2154 .help = "Use crc64 checksums for verification",
2157 .oval = VERIFY_CRC32,
2158 .help = "Use crc32 checksums for verification",
2160 { .ival = "crc32c-intel",
2161 .oval = VERIFY_CRC32C,
2162 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2165 .oval = VERIFY_CRC32C,
2166 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2169 .oval = VERIFY_CRC16,
2170 .help = "Use crc16 checksums for verification",
2173 .oval = VERIFY_CRC7,
2174 .help = "Use crc7 checksums for verification",
2177 .oval = VERIFY_SHA1,
2178 .help = "Use sha1 checksums for verification",
2181 .oval = VERIFY_SHA256,
2182 .help = "Use sha256 checksums for verification",
2185 .oval = VERIFY_SHA512,
2186 .help = "Use sha512 checksums for verification",
2189 .oval = VERIFY_META,
2190 .help = "Use io information",
2194 .oval = VERIFY_NULL,
2195 .help = "Pretend to verify",
2200 .name = "do_verify",
2201 .lname = "Perform verify step",
2202 .type = FIO_OPT_BOOL,
2203 .off1 = td_var_offset(do_verify),
2204 .help = "Run verification stage after write",
2208 .category = FIO_OPT_C_IO,
2209 .group = FIO_OPT_G_VERIFY,
2212 .name = "verifysort",
2213 .lname = "Verify sort",
2214 .type = FIO_OPT_BOOL,
2215 .off1 = td_var_offset(verifysort),
2216 .help = "Sort written verify blocks for read back",
2220 .category = FIO_OPT_C_IO,
2221 .group = FIO_OPT_G_VERIFY,
2224 .name = "verifysort_nr",
2225 .type = FIO_OPT_INT,
2226 .off1 = td_var_offset(verifysort_nr),
2227 .help = "Pre-load and sort verify blocks for a read workload",
2232 .category = FIO_OPT_C_IO,
2233 .group = FIO_OPT_G_VERIFY,
2236 .name = "verify_interval",
2237 .lname = "Verify interval",
2238 .type = FIO_OPT_INT,
2239 .off1 = td_var_offset(verify_interval),
2240 .minval = 2 * sizeof(struct verify_header),
2241 .help = "Store verify buffer header every N bytes",
2244 .interval = 2 * sizeof(struct verify_header),
2245 .category = FIO_OPT_C_IO,
2246 .group = FIO_OPT_G_VERIFY,
2249 .name = "verify_offset",
2250 .lname = "Verify offset",
2251 .type = FIO_OPT_INT,
2252 .help = "Offset verify header location by N bytes",
2253 .off1 = td_var_offset(verify_offset),
2254 .minval = sizeof(struct verify_header),
2257 .category = FIO_OPT_C_IO,
2258 .group = FIO_OPT_G_VERIFY,
2261 .name = "verify_pattern",
2262 .lname = "Verify pattern",
2263 .type = FIO_OPT_STR,
2264 .cb = str_verify_pattern_cb,
2265 .help = "Fill pattern for IO buffers",
2268 .category = FIO_OPT_C_IO,
2269 .group = FIO_OPT_G_VERIFY,
2272 .name = "verify_fatal",
2273 .lname = "Verify fatal",
2274 .type = FIO_OPT_BOOL,
2275 .off1 = td_var_offset(verify_fatal),
2277 .help = "Exit on a single verify failure, don't continue",
2280 .category = FIO_OPT_C_IO,
2281 .group = FIO_OPT_G_VERIFY,
2284 .name = "verify_dump",
2285 .lname = "Verify dump",
2286 .type = FIO_OPT_BOOL,
2287 .off1 = td_var_offset(verify_dump),
2289 .help = "Dump contents of good and bad blocks on failure",
2292 .category = FIO_OPT_C_IO,
2293 .group = FIO_OPT_G_VERIFY,
2296 .name = "verify_async",
2297 .lname = "Verify asynchronously",
2298 .type = FIO_OPT_INT,
2299 .off1 = td_var_offset(verify_async),
2301 .help = "Number of async verifier threads to use",
2304 .category = FIO_OPT_C_IO,
2305 .group = FIO_OPT_G_VERIFY,
2308 .name = "verify_backlog",
2309 .lname = "Verify backlog",
2310 .type = FIO_OPT_STR_VAL,
2311 .off1 = td_var_offset(verify_backlog),
2312 .help = "Verify after this number of blocks are written",
2315 .category = FIO_OPT_C_IO,
2316 .group = FIO_OPT_G_VERIFY,
2319 .name = "verify_backlog_batch",
2320 .lname = "Verify backlog batch",
2321 .type = FIO_OPT_INT,
2322 .off1 = td_var_offset(verify_batch),
2323 .help = "Verify this number of IO blocks",
2326 .category = FIO_OPT_C_IO,
2327 .group = FIO_OPT_G_VERIFY,
2329 #ifdef FIO_HAVE_CPU_AFFINITY
2331 .name = "verify_async_cpus",
2332 .lname = "Async verify CPUs",
2333 .type = FIO_OPT_STR,
2334 .cb = str_verify_cpus_allowed_cb,
2335 .help = "Set CPUs allowed for async verify threads",
2336 .parent = "verify_async",
2338 .category = FIO_OPT_C_IO,
2339 .group = FIO_OPT_G_VERIFY,
2343 .name = "experimental_verify",
2344 .off1 = td_var_offset(experimental_verify),
2345 .type = FIO_OPT_BOOL,
2346 .help = "Enable experimental verification",
2347 .category = FIO_OPT_C_IO,
2348 .group = FIO_OPT_G_VERIFY,
2350 #ifdef FIO_HAVE_TRIM
2352 .name = "trim_percentage",
2353 .lname = "Trim percentage",
2354 .type = FIO_OPT_INT,
2355 .off1 = td_var_offset(trim_percentage),
2358 .help = "Number of verify blocks to discard/trim",
2363 .category = FIO_OPT_C_IO,
2364 .group = FIO_OPT_G_TRIM,
2367 .name = "trim_verify_zero",
2368 .lname = "Verify trim zero",
2369 .type = FIO_OPT_BOOL,
2370 .help = "Verify that trim/discarded blocks are returned as zeroes",
2371 .off1 = td_var_offset(trim_zero),
2372 .parent = "trim_percentage",
2375 .category = FIO_OPT_C_IO,
2376 .group = FIO_OPT_G_TRIM,
2379 .name = "trim_backlog",
2380 .lname = "Trim backlog",
2381 .type = FIO_OPT_STR_VAL,
2382 .off1 = td_var_offset(trim_backlog),
2383 .help = "Trim after this number of blocks are written",
2384 .parent = "trim_percentage",
2387 .category = FIO_OPT_C_IO,
2388 .group = FIO_OPT_G_TRIM,
2391 .name = "trim_backlog_batch",
2392 .lname = "Trim backlog batch",
2393 .type = FIO_OPT_INT,
2394 .off1 = td_var_offset(trim_batch),
2395 .help = "Trim this number of IO blocks",
2396 .parent = "trim_percentage",
2399 .category = FIO_OPT_C_IO,
2400 .group = FIO_OPT_G_TRIM,
2404 .name = "write_iolog",
2405 .lname = "Write I/O log",
2406 .type = FIO_OPT_STR_STORE,
2407 .off1 = td_var_offset(write_iolog_file),
2408 .help = "Store IO pattern to file",
2409 .category = FIO_OPT_C_IO,
2410 .group = FIO_OPT_G_IOLOG,
2413 .name = "read_iolog",
2414 .lname = "Read I/O log",
2415 .type = FIO_OPT_STR_STORE,
2416 .off1 = td_var_offset(read_iolog_file),
2417 .help = "Playback IO pattern from file",
2418 .category = FIO_OPT_C_IO,
2419 .group = FIO_OPT_G_IOLOG,
2422 .name = "replay_no_stall",
2423 .lname = "Don't stall on replay",
2424 .type = FIO_OPT_BOOL,
2425 .off1 = td_var_offset(no_stall),
2427 .parent = "read_iolog",
2429 .help = "Playback IO pattern file as fast as possible without stalls",
2430 .category = FIO_OPT_C_IO,
2431 .group = FIO_OPT_G_IOLOG,
2434 .name = "replay_redirect",
2435 .lname = "Redirect device for replay",
2436 .type = FIO_OPT_STR_STORE,
2437 .off1 = td_var_offset(replay_redirect),
2438 .parent = "read_iolog",
2440 .help = "Replay all I/O onto this device, regardless of trace device",
2441 .category = FIO_OPT_C_IO,
2442 .group = FIO_OPT_G_IOLOG,
2445 .name = "exec_prerun",
2446 .lname = "Pre-execute runnable",
2447 .type = FIO_OPT_STR_STORE,
2448 .off1 = td_var_offset(exec_prerun),
2449 .help = "Execute this file prior to running job",
2450 .category = FIO_OPT_C_GENERAL,
2451 .group = FIO_OPT_G_INVALID,
2454 .name = "exec_postrun",
2455 .lname = "Post-execute runnable",
2456 .type = FIO_OPT_STR_STORE,
2457 .off1 = td_var_offset(exec_postrun),
2458 .help = "Execute this file after running job",
2459 .category = FIO_OPT_C_GENERAL,
2460 .group = FIO_OPT_G_INVALID,
2462 #ifdef FIO_HAVE_IOSCHED_SWITCH
2464 .name = "ioscheduler",
2465 .lname = "I/O scheduler",
2466 .type = FIO_OPT_STR_STORE,
2467 .off1 = td_var_offset(ioscheduler),
2468 .help = "Use this IO scheduler on the backing device",
2469 .category = FIO_OPT_C_FILE,
2470 .group = FIO_OPT_G_INVALID,
2475 .lname = "Zone size",
2476 .type = FIO_OPT_STR_VAL,
2477 .off1 = td_var_offset(zone_size),
2478 .help = "Amount of data to read per zone",
2480 .interval = 1024 * 1024,
2481 .category = FIO_OPT_C_IO,
2482 .group = FIO_OPT_G_ZONE,
2485 .name = "zonerange",
2486 .lname = "Zone range",
2487 .type = FIO_OPT_STR_VAL,
2488 .off1 = td_var_offset(zone_range),
2489 .help = "Give size of an IO zone",
2491 .interval = 1024 * 1024,
2492 .category = FIO_OPT_C_IO,
2493 .group = FIO_OPT_G_ZONE,
2497 .lname = "Zone skip",
2498 .type = FIO_OPT_STR_VAL,
2499 .off1 = td_var_offset(zone_skip),
2500 .help = "Space between IO zones",
2502 .interval = 1024 * 1024,
2503 .category = FIO_OPT_C_IO,
2504 .group = FIO_OPT_G_ZONE,
2508 .lname = "Lock memory",
2509 .type = FIO_OPT_STR_VAL,
2510 .off1 = td_var_offset(lockmem),
2511 .help = "Lock down this amount of memory (per worker)",
2513 .interval = 1024 * 1024,
2514 .category = FIO_OPT_C_GENERAL,
2515 .group = FIO_OPT_G_INVALID,
2518 .name = "rwmixread",
2519 .lname = "Read/write mix read",
2520 .type = FIO_OPT_INT,
2521 .cb = str_rwmix_read_cb,
2523 .help = "Percentage of mixed workload that is reads",
2526 .inverse = "rwmixwrite",
2527 .category = FIO_OPT_C_IO,
2528 .group = FIO_OPT_G_RWMIX,
2531 .name = "rwmixwrite",
2532 .lname = "Read/write mix write",
2533 .type = FIO_OPT_INT,
2534 .cb = str_rwmix_write_cb,
2536 .help = "Percentage of mixed workload that is writes",
2539 .inverse = "rwmixread",
2540 .category = FIO_OPT_C_IO,
2541 .group = FIO_OPT_G_RWMIX,
2544 .name = "rwmixcycle",
2545 .lname = "Read/write mix cycle",
2546 .type = FIO_OPT_DEPRECATED,
2547 .category = FIO_OPT_C_IO,
2548 .group = FIO_OPT_G_RWMIX,
2553 .type = FIO_OPT_INT,
2554 .off1 = td_var_offset(nice),
2555 .help = "Set job CPU nice value",
2560 .category = FIO_OPT_C_GENERAL,
2561 .group = FIO_OPT_G_CRED,
2563 #ifdef FIO_HAVE_IOPRIO
2566 .lname = "I/O nice priority",
2567 .type = FIO_OPT_INT,
2568 .off1 = td_var_offset(ioprio),
2569 .help = "Set job IO priority value",
2573 .category = FIO_OPT_C_GENERAL,
2574 .group = FIO_OPT_G_CRED,
2577 .name = "prioclass",
2578 .lname = "I/O nice priority class",
2579 .type = FIO_OPT_INT,
2580 .off1 = td_var_offset(ioprio_class),
2581 .help = "Set job IO priority class",
2585 .category = FIO_OPT_C_GENERAL,
2586 .group = FIO_OPT_G_CRED,
2590 .name = "thinktime",
2591 .lname = "Thinktime",
2592 .type = FIO_OPT_INT,
2593 .off1 = td_var_offset(thinktime),
2594 .help = "Idle time between IO buffers (usec)",
2596 .category = FIO_OPT_C_IO,
2597 .group = FIO_OPT_G_THINKTIME,
2600 .name = "thinktime_spin",
2601 .lname = "Thinktime spin",
2602 .type = FIO_OPT_INT,
2603 .off1 = td_var_offset(thinktime_spin),
2604 .help = "Start think time by spinning this amount (usec)",
2606 .parent = "thinktime",
2608 .category = FIO_OPT_C_IO,
2609 .group = FIO_OPT_G_THINKTIME,
2612 .name = "thinktime_blocks",
2613 .lname = "Thinktime blocks",
2614 .type = FIO_OPT_INT,
2615 .off1 = td_var_offset(thinktime_blocks),
2616 .help = "IO buffer period between 'thinktime'",
2618 .parent = "thinktime",
2620 .category = FIO_OPT_C_IO,
2621 .group = FIO_OPT_G_THINKTIME,
2625 .lname = "I/O rate",
2626 .type = FIO_OPT_INT,
2627 .off1 = td_var_offset(rate[DDIR_READ]),
2628 .off2 = td_var_offset(rate[DDIR_WRITE]),
2629 .off3 = td_var_offset(rate[DDIR_TRIM]),
2630 .help = "Set bandwidth rate",
2631 .category = FIO_OPT_C_IO,
2632 .group = FIO_OPT_G_RATE,
2636 .lname = "I/O min rate",
2637 .type = FIO_OPT_INT,
2638 .off1 = td_var_offset(ratemin[DDIR_READ]),
2639 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2640 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2641 .help = "Job must meet this rate or it will be shutdown",
2644 .category = FIO_OPT_C_IO,
2645 .group = FIO_OPT_G_RATE,
2648 .name = "rate_iops",
2649 .lname = "I/O rate IOPS",
2650 .type = FIO_OPT_INT,
2651 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2652 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2653 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2654 .help = "Limit IO used to this number of IO operations/sec",
2656 .category = FIO_OPT_C_IO,
2657 .group = FIO_OPT_G_RATE,
2660 .name = "rate_iops_min",
2661 .lname = "I/O min rate IOPS",
2662 .type = FIO_OPT_INT,
2663 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2664 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2665 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2666 .help = "Job must meet this rate or it will be shut down",
2667 .parent = "rate_iops",
2669 .category = FIO_OPT_C_IO,
2670 .group = FIO_OPT_G_RATE,
2673 .name = "ratecycle",
2674 .lname = "I/O rate cycle",
2675 .type = FIO_OPT_INT,
2676 .off1 = td_var_offset(ratecycle),
2677 .help = "Window average for rate limits (msec)",
2681 .category = FIO_OPT_C_IO,
2682 .group = FIO_OPT_G_RATE,
2685 .name = "max_latency",
2686 .type = FIO_OPT_INT,
2687 .off1 = td_var_offset(max_latency),
2688 .help = "Maximum tolerated IO latency (usec)",
2689 .category = FIO_OPT_C_IO,
2690 .group = FIO_OPT_G_LATPROF,
2693 .name = "latency_target",
2694 .lname = "Latency Target (usec)",
2695 .type = FIO_OPT_STR_VAL_TIME,
2696 .off1 = td_var_offset(latency_target),
2697 .help = "Ramp to max queue depth supporting this latency",
2698 .category = FIO_OPT_C_IO,
2699 .group = FIO_OPT_G_LATPROF,
2702 .name = "latency_window",
2703 .lname = "Latency Window (usec)",
2704 .type = FIO_OPT_STR_VAL_TIME,
2705 .off1 = td_var_offset(latency_window),
2706 .help = "Time to sustain latency_target",
2707 .category = FIO_OPT_C_IO,
2708 .group = FIO_OPT_G_LATPROF,
2711 .name = "latency_percentile",
2712 .lname = "Latency Percentile",
2713 .type = FIO_OPT_FLOAT_LIST,
2714 .off1 = td_var_offset(latency_percentile),
2715 .help = "Percentile of IOs must be below latency_target",
2720 .category = FIO_OPT_C_IO,
2721 .group = FIO_OPT_G_LATPROF,
2724 .name = "invalidate",
2725 .lname = "Cache invalidate",
2726 .type = FIO_OPT_BOOL,
2727 .off1 = td_var_offset(invalidate_cache),
2728 .help = "Invalidate buffer/page cache prior to running job",
2730 .category = FIO_OPT_C_IO,
2731 .group = FIO_OPT_G_IO_TYPE,
2735 .lname = "Synchronous I/O",
2736 .type = FIO_OPT_BOOL,
2737 .off1 = td_var_offset(sync_io),
2738 .help = "Use O_SYNC for buffered writes",
2740 .parent = "buffered",
2742 .category = FIO_OPT_C_IO,
2743 .group = FIO_OPT_G_IO_TYPE,
2746 .name = "create_serialize",
2747 .lname = "Create serialize",
2748 .type = FIO_OPT_BOOL,
2749 .off1 = td_var_offset(create_serialize),
2750 .help = "Serialize creating of job files",
2752 .category = FIO_OPT_C_FILE,
2753 .group = FIO_OPT_G_INVALID,
2756 .name = "create_fsync",
2757 .lname = "Create fsync",
2758 .type = FIO_OPT_BOOL,
2759 .off1 = td_var_offset(create_fsync),
2760 .help = "fsync file after creation",
2762 .category = FIO_OPT_C_FILE,
2763 .group = FIO_OPT_G_INVALID,
2766 .name = "create_on_open",
2767 .lname = "Create on open",
2768 .type = FIO_OPT_BOOL,
2769 .off1 = td_var_offset(create_on_open),
2770 .help = "Create files when they are opened for IO",
2772 .category = FIO_OPT_C_FILE,
2773 .group = FIO_OPT_G_INVALID,
2776 .name = "create_only",
2777 .type = FIO_OPT_BOOL,
2778 .off1 = td_var_offset(create_only),
2779 .help = "Only perform file creation phase",
2780 .category = FIO_OPT_C_FILE,
2785 .lname = "Pre-read files",
2786 .type = FIO_OPT_BOOL,
2787 .off1 = td_var_offset(pre_read),
2788 .help = "Pre-read files before starting official testing",
2790 .category = FIO_OPT_C_FILE,
2791 .group = FIO_OPT_G_INVALID,
2793 #ifdef FIO_HAVE_CPU_AFFINITY
2796 .lname = "CPU mask",
2797 .type = FIO_OPT_INT,
2798 .cb = str_cpumask_cb,
2799 .help = "CPU affinity mask",
2800 .category = FIO_OPT_C_GENERAL,
2801 .group = FIO_OPT_G_CRED,
2804 .name = "cpus_allowed",
2805 .lname = "CPUs allowed",
2806 .type = FIO_OPT_STR,
2807 .cb = str_cpus_allowed_cb,
2808 .help = "Set CPUs allowed",
2809 .category = FIO_OPT_C_GENERAL,
2810 .group = FIO_OPT_G_CRED,
2813 #ifdef CONFIG_LIBNUMA
2815 .name = "numa_cpu_nodes",
2816 .type = FIO_OPT_STR,
2817 .cb = str_numa_cpunodes_cb,
2818 .help = "NUMA CPU nodes bind",
2819 .category = FIO_OPT_C_GENERAL,
2820 .group = FIO_OPT_G_INVALID,
2823 .name = "numa_mem_policy",
2824 .type = FIO_OPT_STR,
2825 .cb = str_numa_mpol_cb,
2826 .help = "NUMA memory policy setup",
2827 .category = FIO_OPT_C_GENERAL,
2828 .group = FIO_OPT_G_INVALID,
2832 .name = "end_fsync",
2833 .lname = "End fsync",
2834 .type = FIO_OPT_BOOL,
2835 .off1 = td_var_offset(end_fsync),
2836 .help = "Include fsync at the end of job",
2838 .category = FIO_OPT_C_FILE,
2839 .group = FIO_OPT_G_INVALID,
2842 .name = "fsync_on_close",
2843 .lname = "Fsync on close",
2844 .type = FIO_OPT_BOOL,
2845 .off1 = td_var_offset(fsync_on_close),
2846 .help = "fsync files on close",
2848 .category = FIO_OPT_C_FILE,
2849 .group = FIO_OPT_G_INVALID,
2853 .lname = "Unlink file",
2854 .type = FIO_OPT_BOOL,
2855 .off1 = td_var_offset(unlink),
2856 .help = "Unlink created files after job has completed",
2858 .category = FIO_OPT_C_FILE,
2859 .group = FIO_OPT_G_INVALID,
2863 .lname = "Exit-all on terminate",
2864 .type = FIO_OPT_STR_SET,
2865 .cb = str_exitall_cb,
2866 .help = "Terminate all jobs when one exits",
2867 .category = FIO_OPT_C_GENERAL,
2868 .group = FIO_OPT_G_PROCESS,
2871 .name = "stonewall",
2872 .lname = "Wait for previous",
2873 .alias = "wait_for_previous",
2874 .type = FIO_OPT_STR_SET,
2875 .off1 = td_var_offset(stonewall),
2876 .help = "Insert a hard barrier between this job and previous",
2877 .category = FIO_OPT_C_GENERAL,
2878 .group = FIO_OPT_G_PROCESS,
2881 .name = "new_group",
2882 .lname = "New group",
2883 .type = FIO_OPT_STR_SET,
2884 .off1 = td_var_offset(new_group),
2885 .help = "Mark the start of a new group (for reporting)",
2886 .category = FIO_OPT_C_GENERAL,
2887 .group = FIO_OPT_G_PROCESS,
2892 .type = FIO_OPT_STR_SET,
2893 .off1 = td_var_offset(use_thread),
2894 .help = "Use threads instead of processes",
2895 .category = FIO_OPT_C_GENERAL,
2896 .group = FIO_OPT_G_PROCESS,
2899 .name = "write_bw_log",
2900 .lname = "Write bandwidth log",
2901 .type = FIO_OPT_STR_STORE,
2902 .off1 = td_var_offset(bw_log_file),
2903 .help = "Write log of bandwidth during run",
2904 .category = FIO_OPT_C_LOG,
2905 .group = FIO_OPT_G_INVALID,
2908 .name = "write_lat_log",
2909 .lname = "Write latency log",
2910 .type = FIO_OPT_STR_STORE,
2911 .off1 = td_var_offset(lat_log_file),
2912 .help = "Write log of latency during run",
2913 .category = FIO_OPT_C_LOG,
2914 .group = FIO_OPT_G_INVALID,
2917 .name = "write_iops_log",
2918 .lname = "Write IOPS log",
2919 .type = FIO_OPT_STR_STORE,
2920 .off1 = td_var_offset(iops_log_file),
2921 .help = "Write log of IOPS during run",
2922 .category = FIO_OPT_C_LOG,
2923 .group = FIO_OPT_G_INVALID,
2926 .name = "log_avg_msec",
2927 .lname = "Log averaging (msec)",
2928 .type = FIO_OPT_INT,
2929 .off1 = td_var_offset(log_avg_msec),
2930 .help = "Average bw/iops/lat logs over this period of time",
2932 .category = FIO_OPT_C_LOG,
2933 .group = FIO_OPT_G_INVALID,
2936 .name = "bwavgtime",
2937 .lname = "Bandwidth average time",
2938 .type = FIO_OPT_INT,
2939 .off1 = td_var_offset(bw_avg_time),
2940 .help = "Time window over which to calculate bandwidth"
2943 .parent = "write_bw_log",
2946 .category = FIO_OPT_C_LOG,
2947 .group = FIO_OPT_G_INVALID,
2950 .name = "iopsavgtime",
2951 .lname = "IOPS average time",
2952 .type = FIO_OPT_INT,
2953 .off1 = td_var_offset(iops_avg_time),
2954 .help = "Time window over which to calculate IOPS (msec)",
2956 .parent = "write_iops_log",
2959 .category = FIO_OPT_C_LOG,
2960 .group = FIO_OPT_G_INVALID,
2963 .name = "group_reporting",
2964 .lname = "Group reporting",
2965 .type = FIO_OPT_STR_SET,
2966 .off1 = td_var_offset(group_reporting),
2967 .help = "Do reporting on a per-group basis",
2968 .category = FIO_OPT_C_STAT,
2969 .group = FIO_OPT_G_INVALID,
2972 .name = "zero_buffers",
2973 .lname = "Zero I/O buffers",
2974 .type = FIO_OPT_STR_SET,
2975 .off1 = td_var_offset(zero_buffers),
2976 .help = "Init IO buffers to all zeroes",
2977 .category = FIO_OPT_C_IO,
2978 .group = FIO_OPT_G_IO_BUF,
2981 .name = "refill_buffers",
2982 .lname = "Refill I/O buffers",
2983 .type = FIO_OPT_STR_SET,
2984 .off1 = td_var_offset(refill_buffers),
2985 .help = "Refill IO buffers on every IO submit",
2986 .category = FIO_OPT_C_IO,
2987 .group = FIO_OPT_G_IO_BUF,
2990 .name = "scramble_buffers",
2991 .lname = "Scramble I/O buffers",
2992 .type = FIO_OPT_BOOL,
2993 .off1 = td_var_offset(scramble_buffers),
2994 .help = "Slightly scramble buffers on every IO submit",
2996 .category = FIO_OPT_C_IO,
2997 .group = FIO_OPT_G_IO_BUF,
3000 .name = "buffer_pattern",
3001 .lname = "Buffer pattern",
3002 .type = FIO_OPT_STR,
3003 .cb = str_buffer_pattern_cb,
3004 .help = "Fill pattern for IO buffers",
3005 .category = FIO_OPT_C_IO,
3006 .group = FIO_OPT_G_IO_BUF,
3009 .name = "buffer_compress_percentage",
3010 .lname = "Buffer compression percentage",
3011 .type = FIO_OPT_INT,
3012 .off1 = td_var_offset(compress_percentage),
3015 .help = "How compressible the buffer is (approximately)",
3017 .category = FIO_OPT_C_IO,
3018 .group = FIO_OPT_G_IO_BUF,
3021 .name = "buffer_compress_chunk",
3022 .lname = "Buffer compression chunk size",
3023 .type = FIO_OPT_INT,
3024 .off1 = td_var_offset(compress_chunk),
3025 .parent = "buffer_compress_percentage",
3027 .help = "Size of compressible region in buffer",
3029 .category = FIO_OPT_C_IO,
3030 .group = FIO_OPT_G_IO_BUF,
3033 .name = "clat_percentiles",
3034 .lname = "Completion latency percentiles",
3035 .type = FIO_OPT_BOOL,
3036 .off1 = td_var_offset(clat_percentiles),
3037 .help = "Enable the reporting of completion latency percentiles",
3039 .category = FIO_OPT_C_STAT,
3040 .group = FIO_OPT_G_INVALID,
3043 .name = "percentile_list",
3044 .lname = "Completion latency percentile list",
3045 .type = FIO_OPT_FLOAT_LIST,
3046 .off1 = td_var_offset(percentile_list),
3047 .off2 = td_var_offset(percentile_precision),
3048 .help = "Specify a custom list of percentiles to report",
3049 .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99",
3050 .maxlen = FIO_IO_U_LIST_MAX_LEN,
3053 .category = FIO_OPT_C_STAT,
3054 .group = FIO_OPT_G_INVALID,
3057 #ifdef FIO_HAVE_DISK_UTIL
3059 .name = "disk_util",
3060 .lname = "Disk utilization",
3061 .type = FIO_OPT_BOOL,
3062 .off1 = td_var_offset(do_disk_util),
3063 .help = "Log disk utilization statistics",
3065 .category = FIO_OPT_C_STAT,
3066 .group = FIO_OPT_G_INVALID,
3070 .name = "gtod_reduce",
3071 .lname = "Reduce gettimeofday() calls",
3072 .type = FIO_OPT_BOOL,
3073 .help = "Greatly reduce number of gettimeofday() calls",
3074 .cb = str_gtod_reduce_cb,
3077 .category = FIO_OPT_C_STAT,
3078 .group = FIO_OPT_G_INVALID,
3081 .name = "disable_lat",
3082 .lname = "Disable all latency stats",
3083 .type = FIO_OPT_BOOL,
3084 .off1 = td_var_offset(disable_lat),
3085 .help = "Disable latency numbers",
3086 .parent = "gtod_reduce",
3089 .category = FIO_OPT_C_STAT,
3090 .group = FIO_OPT_G_INVALID,
3093 .name = "disable_clat",
3094 .lname = "Disable completion latency stats",
3095 .type = FIO_OPT_BOOL,
3096 .off1 = td_var_offset(disable_clat),
3097 .help = "Disable completion latency numbers",
3098 .parent = "gtod_reduce",
3101 .category = FIO_OPT_C_STAT,
3102 .group = FIO_OPT_G_INVALID,
3105 .name = "disable_slat",
3106 .lname = "Disable submission latency stats",
3107 .type = FIO_OPT_BOOL,
3108 .off1 = td_var_offset(disable_slat),
3109 .help = "Disable submission latency numbers",
3110 .parent = "gtod_reduce",
3113 .category = FIO_OPT_C_STAT,
3114 .group = FIO_OPT_G_INVALID,
3117 .name = "disable_bw_measurement",
3118 .lname = "Disable bandwidth stats",
3119 .type = FIO_OPT_BOOL,
3120 .off1 = td_var_offset(disable_bw),
3121 .help = "Disable bandwidth logging",
3122 .parent = "gtod_reduce",
3125 .category = FIO_OPT_C_STAT,
3126 .group = FIO_OPT_G_INVALID,
3130 .lname = "Dedicated gettimeofday() CPU",
3131 .type = FIO_OPT_INT,
3132 .cb = str_gtod_cpu_cb,
3133 .help = "Set up dedicated gettimeofday() thread on this CPU",
3134 .verify = gtod_cpu_verify,
3135 .category = FIO_OPT_C_GENERAL,
3136 .group = FIO_OPT_G_CLOCK,
3139 .name = "unified_rw_reporting",
3140 .type = FIO_OPT_BOOL,
3141 .off1 = td_var_offset(unified_rw_rep),
3142 .help = "Unify reporting across data direction",
3144 .category = FIO_OPT_C_GENERAL,
3145 .group = FIO_OPT_G_INVALID,
3148 .name = "continue_on_error",
3149 .lname = "Continue on error",
3150 .type = FIO_OPT_STR,
3151 .off1 = td_var_offset(continue_on_error),
3152 .help = "Continue on non-fatal errors during IO",
3154 .category = FIO_OPT_C_GENERAL,
3155 .group = FIO_OPT_G_ERR,
3158 .oval = ERROR_TYPE_NONE,
3159 .help = "Exit when an error is encountered",
3162 .oval = ERROR_TYPE_READ,
3163 .help = "Continue on read errors only",
3166 .oval = ERROR_TYPE_WRITE,
3167 .help = "Continue on write errors only",
3170 .oval = ERROR_TYPE_READ | ERROR_TYPE_WRITE,
3171 .help = "Continue on any IO errors",
3174 .oval = ERROR_TYPE_VERIFY,
3175 .help = "Continue on verify errors only",
3178 .oval = ERROR_TYPE_ANY,
3179 .help = "Continue on all io and verify errors",
3182 .oval = ERROR_TYPE_NONE,
3183 .help = "Alias for 'none'",
3186 .oval = ERROR_TYPE_ANY,
3187 .help = "Alias for 'all'",
3192 .name = "ignore_error",
3193 .type = FIO_OPT_STR,
3194 .cb = str_ignore_error_cb,
3195 .help = "Set a specific list of errors to ignore",
3197 .category = FIO_OPT_C_GENERAL,
3198 .group = FIO_OPT_G_ERR,
3201 .name = "error_dump",
3202 .type = FIO_OPT_BOOL,
3203 .off1 = td_var_offset(error_dump),
3205 .help = "Dump info on each error",
3206 .category = FIO_OPT_C_GENERAL,
3207 .group = FIO_OPT_G_ERR,
3212 .type = FIO_OPT_STR_STORE,
3213 .off1 = td_var_offset(profile),
3214 .help = "Select a specific builtin performance test",
3215 .category = FIO_OPT_C_PROFILE,
3216 .group = FIO_OPT_G_INVALID,
3221 .type = FIO_OPT_STR_STORE,
3222 .off1 = td_var_offset(cgroup),
3223 .help = "Add job to cgroup of this name",
3224 .category = FIO_OPT_C_GENERAL,
3225 .group = FIO_OPT_G_CGROUP,
3228 .name = "cgroup_nodelete",
3229 .lname = "Cgroup no-delete",
3230 .type = FIO_OPT_BOOL,
3231 .off1 = td_var_offset(cgroup_nodelete),
3232 .help = "Do not delete cgroups after job completion",
3235 .category = FIO_OPT_C_GENERAL,
3236 .group = FIO_OPT_G_CGROUP,
3239 .name = "cgroup_weight",
3240 .lname = "Cgroup weight",
3241 .type = FIO_OPT_INT,
3242 .off1 = td_var_offset(cgroup_weight),
3243 .help = "Use given weight for cgroup",
3247 .category = FIO_OPT_C_GENERAL,
3248 .group = FIO_OPT_G_CGROUP,
3253 .type = FIO_OPT_INT,
3254 .off1 = td_var_offset(uid),
3255 .help = "Run job with this user ID",
3256 .category = FIO_OPT_C_GENERAL,
3257 .group = FIO_OPT_G_CRED,
3261 .lname = "Group ID",
3262 .type = FIO_OPT_INT,
3263 .off1 = td_var_offset(gid),
3264 .help = "Run job with this group ID",
3265 .category = FIO_OPT_C_GENERAL,
3266 .group = FIO_OPT_G_CRED,
3271 .type = FIO_OPT_INT,
3272 .off1 = td_var_offset(kb_base),
3278 .help = "Use 1024 as the K base",
3282 .help = "Use 1000 as the K base",
3285 .help = "How many bytes per KB for reporting (1000 or 1024)",
3286 .category = FIO_OPT_C_GENERAL,
3287 .group = FIO_OPT_G_INVALID,
3290 .name = "unit_base",
3291 .lname = "Base unit for reporting (Bits or Bytes)",
3292 .type = FIO_OPT_INT,
3293 .off1 = td_var_offset(unit_base),
3298 .help = "Auto-detect",
3302 .help = "Normal (byte based)",
3306 .help = "Bit based",
3309 .help = "Bit multiple of result summary data (8 for byte, 1 for bit)",
3310 .category = FIO_OPT_C_GENERAL,
3311 .group = FIO_OPT_G_INVALID,
3314 .name = "hugepage-size",
3315 .lname = "Hugepage size",
3316 .type = FIO_OPT_INT,
3317 .off1 = td_var_offset(hugepage_size),
3318 .help = "When using hugepages, specify size of each page",
3319 .def = __fio_stringify(FIO_HUGE_PAGE),
3320 .interval = 1024 * 1024,
3321 .category = FIO_OPT_C_GENERAL,
3322 .group = FIO_OPT_G_INVALID,
3326 .lname = "I/O flow ID",
3327 .type = FIO_OPT_INT,
3328 .off1 = td_var_offset(flow_id),
3329 .help = "The flow index ID to use",
3331 .category = FIO_OPT_C_IO,
3332 .group = FIO_OPT_G_IO_FLOW,
3336 .lname = "I/O flow weight",
3337 .type = FIO_OPT_INT,
3338 .off1 = td_var_offset(flow),
3339 .help = "Weight for flow control of this job",
3340 .parent = "flow_id",
3343 .category = FIO_OPT_C_IO,