18 #include "crc/crc32c.h"
21 * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
23 static char *get_opt_postfix(const char *str)
25 char *p = strstr(str, ":");
31 strip_blank_front(&p);
36 static int converthexchartoint(char a)
56 static int bs_cmp(const void *p1, const void *p2)
58 const struct bssplit *bsp1 = p1;
59 const struct bssplit *bsp2 = p2;
61 return bsp1->perc < bsp2->perc;
64 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
66 struct bssplit *bssplit;
67 unsigned int i, perc, perc_missing;
68 unsigned int max_bs, min_bs;
72 o->bssplit_nr[ddir] = 4;
73 bssplit = malloc(4 * sizeof(struct bssplit));
78 while ((fname = strsep(&str, ":")) != NULL) {
85 * grow struct buffer, if needed
87 if (i == o->bssplit_nr[ddir]) {
88 o->bssplit_nr[ddir] <<= 1;
89 bssplit = realloc(bssplit, o->bssplit_nr[ddir]
90 * sizeof(struct bssplit));
93 perc_str = strstr(fname, "/");
97 perc = atoi(perc_str);
105 if (str_to_decimal(fname, &val, 1, o, 0)) {
106 log_err("fio: bssplit conversion failed\n");
117 bssplit[i].perc = perc;
121 o->bssplit_nr[ddir] = i;
124 * Now check if the percentages add up, and how much is missing
126 perc = perc_missing = 0;
127 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
128 struct bssplit *bsp = &bssplit[i];
130 if (bsp->perc == (unsigned char) -1)
137 log_err("fio: bssplit percentages add to more than 100%%\n");
142 * If values didn't have a percentage set, divide the remains between
146 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
147 struct bssplit *bsp = &bssplit[i];
149 if (bsp->perc == (unsigned char) -1)
150 bsp->perc = (100 - perc) / perc_missing;
154 o->min_bs[ddir] = min_bs;
155 o->max_bs[ddir] = max_bs;
158 * now sort based on percentages, for ease of lookup
160 qsort(bssplit, o->bssplit_nr[ddir], sizeof(struct bssplit), bs_cmp);
161 o->bssplit[ddir] = bssplit;
165 static int str_bssplit_cb(void *data, const char *input)
167 struct thread_data *td = data;
168 char *str, *p, *odir, *ddir;
174 p = str = strdup(input);
176 strip_blank_front(&str);
177 strip_blank_end(str);
179 odir = strchr(str, ',');
181 ddir = strchr(odir + 1, ',');
183 ret = bssplit_ddir(&td->o, DDIR_TRIM, ddir + 1);
189 op = strdup(odir + 1);
190 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
195 ret = bssplit_ddir(&td->o, DDIR_WRITE, odir + 1);
198 ret = bssplit_ddir(&td->o, DDIR_READ, str);
204 ret = bssplit_ddir(&td->o, DDIR_WRITE, op);
209 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
212 ret = bssplit_ddir(&td->o, DDIR_READ, str);
219 static int str2error(char *str)
221 const char *err[] = { "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO",
222 "ENXIO", "E2BIG", "ENOEXEC", "EBADF",
223 "ECHILD", "EAGAIN", "ENOMEM", "EACCES",
224 "EFAULT", "ENOTBLK", "EBUSY", "EEXIST",
225 "EXDEV", "ENODEV", "ENOTDIR", "EISDIR",
226 "EINVAL", "ENFILE", "EMFILE", "ENOTTY",
227 "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE",
228 "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" };
229 int i = 0, num = sizeof(err) / sizeof(void *);
232 if (!strcmp(err[i], str))
239 static int ignore_error_type(struct thread_data *td, int etype, char *str)
245 if (etype >= ERROR_TYPE_CNT) {
246 log_err("Illegal error type\n");
250 td->o.ignore_error_nr[etype] = 4;
251 error = malloc(4 * sizeof(struct bssplit));
254 while ((fname = strsep(&str, ":")) != NULL) {
260 * grow struct buffer, if needed
262 if (i == td->o.ignore_error_nr[etype]) {
263 td->o.ignore_error_nr[etype] <<= 1;
264 error = realloc(error, td->o.ignore_error_nr[etype]
267 if (fname[0] == 'E') {
268 error[i] = str2error(fname);
270 error[i] = atoi(fname);
272 error[i] = -error[i];
275 log_err("Unknown error %s, please use number value \n",
283 td->o.continue_on_error |= 1 << etype;
284 td->o.ignore_error_nr[etype] = i;
285 td->o.ignore_error[etype] = error;
293 static int str_ignore_error_cb(void *data, const char *input)
295 struct thread_data *td = data;
297 int type = 0, ret = 1;
302 p = str = strdup(input);
304 strip_blank_front(&str);
305 strip_blank_end(str);
311 ret = ignore_error_type(td, type, p);
321 static int str_rw_cb(void *data, const char *str)
323 struct thread_data *td = data;
324 struct thread_options *o = &td->o;
333 nr = get_opt_postfix(str);
338 o->ddir_seq_nr = atoi(nr);
342 if (str_to_decimal(nr, &val, 1, o, 0)) {
343 log_err("fio: rw postfix parsing failed\n");
348 o->ddir_seq_add = val;
355 static int str_mem_cb(void *data, const char *mem)
357 struct thread_data *td = data;
359 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
360 td->o.mmapfile = get_opt_postfix(mem);
365 static int fio_clock_source_cb(void *data, const char *str)
367 struct thread_data *td = data;
369 fio_clock_source = td->o.clocksource;
370 fio_clock_source_set = 1;
375 static int str_rwmix_read_cb(void *data, unsigned long long *val)
377 struct thread_data *td = data;
379 td->o.rwmix[DDIR_READ] = *val;
380 td->o.rwmix[DDIR_WRITE] = 100 - *val;
384 static int str_rwmix_write_cb(void *data, unsigned long long *val)
386 struct thread_data *td = data;
388 td->o.rwmix[DDIR_WRITE] = *val;
389 td->o.rwmix[DDIR_READ] = 100 - *val;
393 static int str_exitall_cb(void)
395 exitall_on_terminate = 1;
399 #ifdef FIO_HAVE_CPU_AFFINITY
400 int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
402 unsigned int i, index, cpus_in_mask;
403 const long max_cpu = cpus_online();
405 cpus_in_mask = fio_cpu_count(mask);
406 cpu_index = cpu_index % cpus_in_mask;
409 for (i = 0; i < max_cpu; i++) {
410 if (!fio_cpu_isset(mask, i))
413 if (cpu_index != index)
414 fio_cpu_clear(mask, i);
419 return fio_cpu_count(mask);
422 static int str_cpumask_cb(void *data, unsigned long long *val)
424 struct thread_data *td = data;
432 ret = fio_cpuset_init(&td->o.cpumask);
434 log_err("fio: cpuset_init failed\n");
435 td_verror(td, ret, "fio_cpuset_init");
439 max_cpu = cpus_online();
441 for (i = 0; i < sizeof(int) * 8; i++) {
442 if ((1 << i) & *val) {
444 log_err("fio: CPU %d too large (max=%ld)\n", i,
448 dprint(FD_PARSE, "set cpu allowed %d\n", i);
449 fio_cpu_set(&td->o.cpumask, i);
453 td->o.cpumask_set = 1;
457 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
464 ret = fio_cpuset_init(mask);
466 log_err("fio: cpuset_init failed\n");
467 td_verror(td, ret, "fio_cpuset_init");
471 p = str = strdup(input);
473 strip_blank_front(&str);
474 strip_blank_end(str);
476 max_cpu = cpus_online();
478 while ((cpu = strsep(&str, ",")) != NULL) {
487 while ((cpu2 = strsep(&str2, "-")) != NULL) {
497 while (icpu <= icpu2) {
498 if (icpu >= FIO_MAX_CPUS) {
499 log_err("fio: your OS only supports up to"
500 " %d CPUs\n", (int) FIO_MAX_CPUS);
504 if (icpu > max_cpu) {
505 log_err("fio: CPU %d too large (max=%ld)\n",
511 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
512 fio_cpu_set(mask, icpu);
521 td->o.cpumask_set = 1;
525 static int str_cpus_allowed_cb(void *data, const char *input)
527 struct thread_data *td = data;
533 ret = set_cpus_allowed(td, &td->o.cpumask, input);
535 td->o.cpumask_set = 1;
540 static int str_verify_cpus_allowed_cb(void *data, const char *input)
542 struct thread_data *td = data;
545 ret = set_cpus_allowed(td, &td->o.verify_cpumask, input);
547 td->o.verify_cpumask_set = 1;
553 #ifdef CONFIG_LIBNUMA
554 static int str_numa_cpunodes_cb(void *data, char *input)
556 struct thread_data *td = data;
561 /* numa_parse_nodestring() parses a character string list
562 * of nodes into a bit mask. The bit mask is allocated by
563 * numa_allocate_nodemask(), so it should be freed by
564 * numa_free_nodemask().
566 td->o.numa_cpunodesmask = numa_parse_nodestring(input);
567 if (td->o.numa_cpunodesmask == NULL) {
568 log_err("fio: numa_parse_nodestring failed\n");
569 td_verror(td, 1, "str_numa_cpunodes_cb");
573 td->o.numa_cpumask_set = 1;
577 static int str_numa_mpol_cb(void *data, char *input)
579 struct thread_data *td = data;
580 const char * const policy_types[] =
581 { "default", "prefer", "bind", "interleave", "local", NULL };
588 nodelist = strchr(input, ':');
590 /* NUL-terminate mode */
594 for (i = 0; i <= MPOL_LOCAL; i++) {
595 if (!strcmp(input, policy_types[i])) {
596 td->o.numa_mem_mode = i;
600 if (i > MPOL_LOCAL) {
601 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
605 switch (td->o.numa_mem_mode) {
608 * Insist on a nodelist of one node only
611 char *rest = nodelist;
612 while (isdigit(*rest))
615 log_err("fio: one node only for \'prefer\'\n");
619 log_err("fio: one node is needed for \'prefer\'\n");
623 case MPOL_INTERLEAVE:
625 * Default to online nodes with memory if no nodelist
628 nodelist = strdup("all");
633 * Don't allow a nodelist
636 log_err("fio: NO nodelist for \'local\'\n");
642 * Insist on a nodelist
645 log_err("fio: a nodelist is needed for \'bind\'\n");
652 /* numa_parse_nodestring() parses a character string list
653 * of nodes into a bit mask. The bit mask is allocated by
654 * numa_allocate_nodemask(), so it should be freed by
655 * numa_free_nodemask().
657 switch (td->o.numa_mem_mode) {
659 td->o.numa_mem_prefer_node = atoi(nodelist);
661 case MPOL_INTERLEAVE:
663 td->o.numa_memnodesmask = numa_parse_nodestring(nodelist);
664 if (td->o.numa_memnodesmask == NULL) {
665 log_err("fio: numa_parse_nodestring failed\n");
666 td_verror(td, 1, "str_numa_memnodes_cb");
676 td->o.numa_memmask_set = 1;
684 static int str_fst_cb(void *data, const char *str)
686 struct thread_data *td = data;
687 char *nr = get_opt_postfix(str);
689 td->file_service_nr = 1;
691 td->file_service_nr = atoi(nr);
698 #ifdef CONFIG_SYNC_FILE_RANGE
699 static int str_sfr_cb(void *data, const char *str)
701 struct thread_data *td = data;
702 char *nr = get_opt_postfix(str);
704 td->sync_file_range_nr = 1;
706 td->sync_file_range_nr = atoi(nr);
714 static int str_random_distribution_cb(void *data, const char *str)
716 struct thread_data *td = data;
723 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
725 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
730 nr = get_opt_postfix(str);
731 if (nr && !str_to_float(nr, &val)) {
732 log_err("fio: random postfix parsing failed\n");
739 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
741 log_err("fio: zipf theta must different than 1.0\n");
744 td->o.zipf_theta.u.f = val;
746 if (val <= 0.00 || val >= 1.00) {
747 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
750 td->o.pareto_h.u.f = val;
757 * Return next name in the string. Files are separated with ':'. If the ':'
758 * is escaped with a '\', then that ':' is part of the filename and does not
759 * indicate a new file.
761 static char *get_next_name(char **ptr)
766 if (!str || !strlen(str))
772 * No colon, we are done
774 p = strchr(str, ':');
781 * We got a colon, but it's the first character. Skip and
789 if (*(p - 1) != '\\') {
795 memmove(p - 1, p, strlen(p) + 1);
803 static int get_max_name_idx(char *input)
805 unsigned int cur_idx;
808 p = str = strdup(input);
809 for (cur_idx = 0; ; cur_idx++)
810 if (get_next_name(&str) == NULL)
818 * Returns the directory at the index, indexes > entires will be
819 * assigned via modulo division of the index
821 int set_name_idx(char *target, char *input, int index)
823 unsigned int cur_idx;
825 char *fname, *str, *p;
827 p = str = strdup(input);
829 index %= get_max_name_idx(input);
830 for (cur_idx = 0; cur_idx <= index; cur_idx++)
831 fname = get_next_name(&str);
833 len = sprintf(target, "%s/", fname);
839 static int str_filename_cb(void *data, const char *input)
841 struct thread_data *td = data;
842 char *fname, *str, *p;
844 p = str = strdup(input);
846 strip_blank_front(&str);
847 strip_blank_end(str);
849 if (!td->files_index)
852 while ((fname = get_next_name(&str)) != NULL) {
855 add_file(td, fname, 0, 1);
862 static int str_directory_cb(void *data, const char fio_unused *unused)
864 struct thread_data *td = data;
866 char *dirname, *str, *p;
872 p = str = strdup(td->o.directory);
873 while ((dirname = get_next_name(&str)) != NULL) {
874 if (lstat(dirname, &sb) < 0) {
877 log_err("fio: %s is not a directory\n", dirname);
878 td_verror(td, ret, "lstat");
881 if (!S_ISDIR(sb.st_mode)) {
882 log_err("fio: %s is not a directory\n", dirname);
893 static int str_lockfile_cb(void *data, const char fio_unused *str)
895 struct thread_data *td = data;
897 if (td->files_index) {
898 log_err("fio: lockfile= option must precede filename=\n");
905 static int str_opendir_cb(void *data, const char fio_unused *str)
907 struct thread_data *td = data;
912 if (!td->files_index)
915 return add_dir_files(td, td->o.opendir);
918 static int pattern_cb(char *pattern, unsigned int max_size,
919 const char *input, unsigned int *pattern_bytes)
922 int i = 0, j = 0, len, k, base = 10;
923 uint32_t pattern_length;
926 loc1 = strstr(input, "0x");
927 loc2 = strstr(input, "0X");
930 off = strtol(input, NULL, base);
931 if (off != LONG_MAX || errno != ERANGE) {
933 pattern[i] = off & 0xff;
942 j = loc1 - input + 2;
944 j = loc2 - input + 2;
947 if (len - j < max_size * 2) {
949 off = converthexchartoint(input[k--]);
951 off += (converthexchartoint(input[k--])
953 pattern[i++] = (char) off;
959 * Fill the pattern all the way to the end. This greatly reduces
960 * the number of memcpy's we have to do when verifying the IO.
963 while (i > 1 && i * 2 <= max_size) {
964 memcpy(&pattern[i], &pattern[0], i);
969 * Fill remainder, if the pattern multiple ends up not being
972 while (i > 1 && i < max_size) {
973 unsigned int b = min(pattern_length, max_size - i);
975 memcpy(&pattern[i], &pattern[0], b);
981 * The code in verify_io_u_pattern assumes a single byte pattern
982 * fills the whole verify pattern buffer.
984 memset(pattern, pattern[0], max_size);
991 static int str_buffer_pattern_cb(void *data, const char *input)
993 struct thread_data *td = data;
996 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
997 &td->o.buffer_pattern_bytes);
1000 td->o.refill_buffers = 0;
1001 td->o.scramble_buffers = 0;
1002 td->o.zero_buffers = 0;
1008 static int str_buffer_compress_cb(void *data, unsigned long long *il)
1010 struct thread_data *td = data;
1012 td->flags |= TD_F_COMPRESS;
1013 td->o.compress_percentage = *il;
1017 static int str_verify_pattern_cb(void *data, const char *input)
1019 struct thread_data *td = data;
1022 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
1023 &td->o.verify_pattern_bytes);
1026 * VERIFY_META could already be set
1028 if (!ret && td->o.verify == VERIFY_NONE)
1029 td->o.verify = VERIFY_PATTERN;
1034 static int str_gtod_reduce_cb(void *data, int *il)
1036 struct thread_data *td = data;
1039 td->o.disable_lat = !!val;
1040 td->o.disable_clat = !!val;
1041 td->o.disable_slat = !!val;
1042 td->o.disable_bw = !!val;
1043 td->o.clat_percentiles = !val;
1045 td->tv_cache_mask = 63;
1050 static int str_gtod_cpu_cb(void *data, long long *il)
1052 struct thread_data *td = data;
1055 td->o.gtod_cpu = val;
1056 td->o.gtod_offload = 1;
1060 static int str_size_cb(void *data, unsigned long long *__val)
1062 struct thread_data *td = data;
1063 unsigned long long v = *__val;
1065 if (parse_is_percent(v)) {
1067 td->o.size_percent = -1ULL - v;
1074 static int rw_verify(struct fio_option *o, void *data)
1076 struct thread_data *td = data;
1078 if (read_only && td_write(td)) {
1079 log_err("fio: job <%s> has write bit set, but fio is in"
1080 " read-only mode\n", td->o.name);
1087 static int gtod_cpu_verify(struct fio_option *o, void *data)
1089 #ifndef FIO_HAVE_CPU_AFFINITY
1090 struct thread_data *td = data;
1092 if (td->o.gtod_cpu) {
1093 log_err("fio: platform must support CPU affinity for"
1094 "gettimeofday() offloading\n");
1105 static struct opt_group fio_opt_groups[] = {
1108 .mask = FIO_OPT_C_GENERAL,
1112 .mask = FIO_OPT_C_IO,
1116 .mask = FIO_OPT_C_FILE,
1119 .name = "Statistics",
1120 .mask = FIO_OPT_C_STAT,
1124 .mask = FIO_OPT_C_LOG,
1128 .mask = FIO_OPT_C_PROFILE,
1135 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1136 unsigned int inv_mask)
1138 struct opt_group *og;
1141 if (*mask == inv_mask || !*mask)
1144 for (i = 0; ogs[i].name; i++) {
1147 if (*mask & og->mask) {
1148 *mask &= ~(og->mask);
1156 struct opt_group *opt_group_from_mask(unsigned int *mask)
1158 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1161 static struct opt_group fio_opt_cat_groups[] = {
1163 .name = "Latency profiling",
1164 .mask = FIO_OPT_G_LATPROF,
1168 .mask = FIO_OPT_G_RATE,
1172 .mask = FIO_OPT_G_ZONE,
1175 .name = "Read/write mix",
1176 .mask = FIO_OPT_G_RWMIX,
1180 .mask = FIO_OPT_G_VERIFY,
1184 .mask = FIO_OPT_G_TRIM,
1187 .name = "I/O Logging",
1188 .mask = FIO_OPT_G_IOLOG,
1191 .name = "I/O Depth",
1192 .mask = FIO_OPT_G_IO_DEPTH,
1196 .mask = FIO_OPT_G_IO_FLOW,
1199 .name = "Description",
1200 .mask = FIO_OPT_G_DESC,
1204 .mask = FIO_OPT_G_FILENAME,
1207 .name = "General I/O",
1208 .mask = FIO_OPT_G_IO_BASIC,
1212 .mask = FIO_OPT_G_CGROUP,
1216 .mask = FIO_OPT_G_RUNTIME,
1220 .mask = FIO_OPT_G_PROCESS,
1223 .name = "Job credentials / priority",
1224 .mask = FIO_OPT_G_CRED,
1227 .name = "Clock settings",
1228 .mask = FIO_OPT_G_CLOCK,
1232 .mask = FIO_OPT_G_IO_TYPE,
1235 .name = "I/O Thinktime",
1236 .mask = FIO_OPT_G_THINKTIME,
1239 .name = "Randomizations",
1240 .mask = FIO_OPT_G_RANDOM,
1243 .name = "I/O buffers",
1244 .mask = FIO_OPT_G_IO_BUF,
1247 .name = "Tiobench profile",
1248 .mask = FIO_OPT_G_TIOBENCH,
1256 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1258 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1262 * Map of job/command line options
1264 struct fio_option fio_options[FIO_MAX_OPTS] = {
1266 .name = "description",
1267 .lname = "Description of job",
1268 .type = FIO_OPT_STR_STORE,
1269 .off1 = td_var_offset(description),
1270 .help = "Text job description",
1271 .category = FIO_OPT_C_GENERAL,
1272 .group = FIO_OPT_G_DESC,
1276 .lname = "Job name",
1277 .type = FIO_OPT_STR_STORE,
1278 .off1 = td_var_offset(name),
1279 .help = "Name of this job",
1280 .category = FIO_OPT_C_GENERAL,
1281 .group = FIO_OPT_G_DESC,
1285 .lname = "Filename(s)",
1286 .type = FIO_OPT_STR_STORE,
1287 .off1 = td_var_offset(filename),
1288 .cb = str_filename_cb,
1289 .prio = -1, /* must come after "directory" */
1290 .help = "File(s) to use for the workload",
1291 .category = FIO_OPT_C_FILE,
1292 .group = FIO_OPT_G_FILENAME,
1295 .name = "directory",
1296 .lname = "Directory",
1297 .type = FIO_OPT_STR_STORE,
1298 .off1 = td_var_offset(directory),
1299 .cb = str_directory_cb,
1300 .help = "Directory to store files in",
1301 .category = FIO_OPT_C_FILE,
1302 .group = FIO_OPT_G_FILENAME,
1305 .name = "filename_format",
1306 .type = FIO_OPT_STR_STORE,
1307 .off1 = td_var_offset(filename_format),
1308 .prio = -1, /* must come after "directory" */
1309 .help = "Override default $jobname.$jobnum.$filenum naming",
1310 .def = "$jobname.$jobnum.$filenum",
1311 .category = FIO_OPT_C_FILE,
1312 .group = FIO_OPT_G_FILENAME,
1316 .lname = "Lockfile",
1317 .type = FIO_OPT_STR,
1318 .off1 = td_var_offset(file_lock_mode),
1319 .help = "Lock file when doing IO to it",
1321 .parent = "filename",
1324 .cb = str_lockfile_cb,
1325 .category = FIO_OPT_C_FILE,
1326 .group = FIO_OPT_G_FILENAME,
1329 .oval = FILE_LOCK_NONE,
1330 .help = "No file locking",
1332 { .ival = "exclusive",
1333 .oval = FILE_LOCK_EXCLUSIVE,
1334 .help = "Exclusive file lock",
1337 .ival = "readwrite",
1338 .oval = FILE_LOCK_READWRITE,
1339 .help = "Read vs write lock",
1345 .lname = "Open directory",
1346 .type = FIO_OPT_STR_STORE,
1347 .off1 = td_var_offset(opendir),
1348 .cb = str_opendir_cb,
1349 .help = "Recursively add files from this directory and down",
1350 .category = FIO_OPT_C_FILE,
1351 .group = FIO_OPT_G_FILENAME,
1355 .lname = "Read/write",
1356 .alias = "readwrite",
1357 .type = FIO_OPT_STR,
1359 .off1 = td_var_offset(td_ddir),
1360 .help = "IO direction",
1362 .verify = rw_verify,
1363 .category = FIO_OPT_C_IO,
1364 .group = FIO_OPT_G_IO_BASIC,
1367 .oval = TD_DDIR_READ,
1368 .help = "Sequential read",
1371 .oval = TD_DDIR_WRITE,
1372 .help = "Sequential write",
1375 .oval = TD_DDIR_TRIM,
1376 .help = "Sequential trim",
1378 { .ival = "randread",
1379 .oval = TD_DDIR_RANDREAD,
1380 .help = "Random read",
1382 { .ival = "randwrite",
1383 .oval = TD_DDIR_RANDWRITE,
1384 .help = "Random write",
1386 { .ival = "randtrim",
1387 .oval = TD_DDIR_RANDTRIM,
1388 .help = "Random trim",
1392 .help = "Sequential read and write mix",
1394 { .ival = "readwrite",
1396 .help = "Sequential read and write mix",
1399 .oval = TD_DDIR_RANDRW,
1400 .help = "Random read and write mix"
1405 .name = "rw_sequencer",
1406 .lname = "RW Sequencer",
1407 .type = FIO_OPT_STR,
1408 .off1 = td_var_offset(rw_seq),
1409 .help = "IO offset generator modifier",
1410 .def = "sequential",
1411 .category = FIO_OPT_C_IO,
1412 .group = FIO_OPT_G_IO_BASIC,
1414 { .ival = "sequential",
1416 .help = "Generate sequential offsets",
1418 { .ival = "identical",
1419 .oval = RW_SEQ_IDENT,
1420 .help = "Generate identical offsets",
1427 .lname = "IO Engine",
1428 .type = FIO_OPT_STR_STORE,
1429 .off1 = td_var_offset(ioengine),
1430 .help = "IO engine to use",
1431 .def = FIO_PREFERRED_ENGINE,
1432 .category = FIO_OPT_C_IO,
1433 .group = FIO_OPT_G_IO_BASIC,
1436 .help = "Use read/write",
1439 .help = "Use pread/pwrite",
1442 .help = "Use readv/writev",
1444 #ifdef CONFIG_PWRITEV
1446 .help = "Use preadv/pwritev",
1449 #ifdef CONFIG_LIBAIO
1451 .help = "Linux native asynchronous IO",
1454 #ifdef CONFIG_POSIXAIO
1455 { .ival = "posixaio",
1456 .help = "POSIX asynchronous IO",
1459 #ifdef CONFIG_SOLARISAIO
1460 { .ival = "solarisaio",
1461 .help = "Solaris native asynchronous IO",
1464 #ifdef CONFIG_WINDOWSAIO
1465 { .ival = "windowsaio",
1466 .help = "Windows native asynchronous IO"
1471 .help = "Rados Block Device asynchronous IO"
1475 .help = "Memory mapped IO"
1477 #ifdef CONFIG_LINUX_SPLICE
1479 .help = "splice/vmsplice based IO",
1481 { .ival = "netsplice",
1482 .help = "splice/vmsplice to/from the network",
1485 #ifdef FIO_HAVE_SGIO
1487 .help = "SCSI generic v3 IO",
1491 .help = "Testing engine (no data transfer)",
1494 .help = "Network IO",
1497 .help = "CPU cycle burner engine",
1501 .help = "GUASI IO engine",
1504 #ifdef FIO_HAVE_BINJECT
1505 { .ival = "binject",
1506 .help = "binject direct inject block engine",
1511 .help = "RDMA IO engine",
1514 #ifdef CONFIG_FUSION_AW
1515 { .ival = "fusion-aw-sync",
1516 .help = "Fusion-io atomic write engine",
1519 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1520 { .ival = "e4defrag",
1521 .help = "ext4 defrag engine",
1524 #ifdef CONFIG_LINUX_FALLOCATE
1526 .help = "fallocate() file based engine",
1529 { .ival = "external",
1530 .help = "Load external engine (append name)",
1536 .lname = "IO Depth",
1537 .type = FIO_OPT_INT,
1538 .off1 = td_var_offset(iodepth),
1539 .help = "Number of IO buffers to keep in flight",
1543 .category = FIO_OPT_C_IO,
1544 .group = FIO_OPT_G_IO_BASIC,
1547 .name = "iodepth_batch",
1548 .lname = "IO Depth batch",
1549 .alias = "iodepth_batch_submit",
1550 .type = FIO_OPT_INT,
1551 .off1 = td_var_offset(iodepth_batch),
1552 .help = "Number of IO buffers to submit in one go",
1553 .parent = "iodepth",
1558 .category = FIO_OPT_C_IO,
1559 .group = FIO_OPT_G_IO_BASIC,
1562 .name = "iodepth_batch_complete",
1563 .lname = "IO Depth batch complete",
1564 .type = FIO_OPT_INT,
1565 .off1 = td_var_offset(iodepth_batch_complete),
1566 .help = "Number of IO buffers to retrieve in one go",
1567 .parent = "iodepth",
1572 .category = FIO_OPT_C_IO,
1573 .group = FIO_OPT_G_IO_BASIC,
1576 .name = "iodepth_low",
1577 .lname = "IO Depth batch low",
1578 .type = FIO_OPT_INT,
1579 .off1 = td_var_offset(iodepth_low),
1580 .help = "Low water mark for queuing depth",
1581 .parent = "iodepth",
1584 .category = FIO_OPT_C_IO,
1585 .group = FIO_OPT_G_IO_BASIC,
1590 .type = FIO_OPT_STR_VAL,
1592 .help = "Total size of device or files",
1593 .interval = 1024 * 1024,
1594 .category = FIO_OPT_C_IO,
1595 .group = FIO_OPT_G_INVALID,
1598 .name = "fill_device",
1599 .lname = "Fill device",
1601 .type = FIO_OPT_BOOL,
1602 .off1 = td_var_offset(fill_device),
1603 .help = "Write until an ENOSPC error occurs",
1605 .category = FIO_OPT_C_FILE,
1606 .group = FIO_OPT_G_INVALID,
1610 .lname = "File size",
1611 .type = FIO_OPT_STR_VAL,
1612 .off1 = td_var_offset(file_size_low),
1613 .off2 = td_var_offset(file_size_high),
1615 .help = "Size of individual files",
1616 .interval = 1024 * 1024,
1617 .category = FIO_OPT_C_FILE,
1618 .group = FIO_OPT_G_INVALID,
1621 .name = "file_append",
1622 .lname = "File append",
1623 .type = FIO_OPT_BOOL,
1624 .off1 = td_var_offset(file_append),
1625 .help = "IO will start at the end of the file(s)",
1627 .category = FIO_OPT_C_FILE,
1628 .group = FIO_OPT_G_INVALID,
1632 .lname = "IO offset",
1633 .alias = "fileoffset",
1634 .type = FIO_OPT_STR_VAL,
1635 .off1 = td_var_offset(start_offset),
1636 .help = "Start IO from this offset",
1638 .interval = 1024 * 1024,
1639 .category = FIO_OPT_C_IO,
1640 .group = FIO_OPT_G_INVALID,
1643 .name = "offset_increment",
1644 .lname = "IO offset increment",
1645 .type = FIO_OPT_STR_VAL,
1646 .off1 = td_var_offset(offset_increment),
1647 .help = "What is the increment from one offset to the next",
1651 .interval = 1024 * 1024,
1652 .category = FIO_OPT_C_IO,
1653 .group = FIO_OPT_G_INVALID,
1656 .name = "number_ios",
1657 .lname = "Number of IOs to perform",
1658 .type = FIO_OPT_STR_VAL,
1659 .off1 = td_var_offset(number_ios),
1660 .help = "Force job completion of this number of IOs",
1662 .category = FIO_OPT_C_IO,
1663 .group = FIO_OPT_G_INVALID,
1667 .lname = "Block size",
1668 .alias = "blocksize",
1669 .type = FIO_OPT_INT,
1670 .off1 = td_var_offset(bs[DDIR_READ]),
1671 .off2 = td_var_offset(bs[DDIR_WRITE]),
1672 .off3 = td_var_offset(bs[DDIR_TRIM]),
1674 .help = "Block size unit",
1679 .category = FIO_OPT_C_IO,
1680 .group = FIO_OPT_G_INVALID,
1684 .lname = "Block size align",
1685 .alias = "blockalign",
1686 .type = FIO_OPT_INT,
1687 .off1 = td_var_offset(ba[DDIR_READ]),
1688 .off2 = td_var_offset(ba[DDIR_WRITE]),
1689 .off3 = td_var_offset(ba[DDIR_TRIM]),
1691 .help = "IO block offset alignment",
1695 .category = FIO_OPT_C_IO,
1696 .group = FIO_OPT_G_INVALID,
1700 .lname = "Block size range",
1701 .alias = "blocksize_range",
1702 .type = FIO_OPT_RANGE,
1703 .off1 = td_var_offset(min_bs[DDIR_READ]),
1704 .off2 = td_var_offset(max_bs[DDIR_READ]),
1705 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1706 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1707 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1708 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1710 .help = "Set block size range (in more detail than bs)",
1714 .category = FIO_OPT_C_IO,
1715 .group = FIO_OPT_G_INVALID,
1719 .lname = "Block size split",
1720 .type = FIO_OPT_STR,
1721 .cb = str_bssplit_cb,
1722 .help = "Set a specific mix of block sizes",
1725 .category = FIO_OPT_C_IO,
1726 .group = FIO_OPT_G_INVALID,
1729 .name = "bs_unaligned",
1730 .lname = "Block size unaligned",
1731 .alias = "blocksize_unaligned",
1732 .type = FIO_OPT_STR_SET,
1733 .off1 = td_var_offset(bs_unaligned),
1734 .help = "Don't sector align IO buffer sizes",
1737 .category = FIO_OPT_C_IO,
1738 .group = FIO_OPT_G_INVALID,
1741 .name = "bs_is_seq_rand",
1742 .lname = "Block size division is seq/random (not read/write)",
1743 .type = FIO_OPT_BOOL,
1744 .off1 = td_var_offset(bs_is_seq_rand),
1745 .help = "Consider any blocksize setting to be sequential,ramdom",
1747 .parent = "blocksize",
1748 .category = FIO_OPT_C_IO,
1749 .group = FIO_OPT_G_INVALID,
1752 .name = "randrepeat",
1753 .lname = "Random repeatable",
1754 .type = FIO_OPT_BOOL,
1755 .off1 = td_var_offset(rand_repeatable),
1756 .help = "Use repeatable random IO pattern",
1760 .category = FIO_OPT_C_IO,
1761 .group = FIO_OPT_G_RANDOM,
1765 .lname = "The random generator seed",
1766 .type = FIO_OPT_STR_VAL,
1767 .off1 = td_var_offset(rand_seed),
1768 .help = "Set the random generator seed value",
1770 .category = FIO_OPT_C_IO,
1771 .group = FIO_OPT_G_RANDOM,
1774 .name = "use_os_rand",
1775 .lname = "Use OS random",
1776 .type = FIO_OPT_BOOL,
1777 .off1 = td_var_offset(use_os_rand),
1778 .help = "Set to use OS random generator",
1782 .category = FIO_OPT_C_IO,
1783 .group = FIO_OPT_G_RANDOM,
1786 .name = "norandommap",
1787 .lname = "No randommap",
1788 .type = FIO_OPT_STR_SET,
1789 .off1 = td_var_offset(norandommap),
1790 .help = "Accept potential duplicate random blocks",
1794 .category = FIO_OPT_C_IO,
1795 .group = FIO_OPT_G_RANDOM,
1798 .name = "softrandommap",
1799 .lname = "Soft randommap",
1800 .type = FIO_OPT_BOOL,
1801 .off1 = td_var_offset(softrandommap),
1802 .help = "Set norandommap if randommap allocation fails",
1803 .parent = "norandommap",
1806 .category = FIO_OPT_C_IO,
1807 .group = FIO_OPT_G_RANDOM,
1810 .name = "random_generator",
1811 .type = FIO_OPT_STR,
1812 .off1 = td_var_offset(random_generator),
1813 .help = "Type of random number generator to use",
1814 .def = "tausworthe",
1816 { .ival = "tausworthe",
1817 .oval = FIO_RAND_GEN_TAUSWORTHE,
1818 .help = "Strong Tausworthe generator",
1821 .oval = FIO_RAND_GEN_LFSR,
1822 .help = "Variable length LFSR",
1825 .category = FIO_OPT_C_IO,
1826 .group = FIO_OPT_G_RANDOM,
1829 .name = "random_distribution",
1830 .type = FIO_OPT_STR,
1831 .off1 = td_var_offset(random_distribution),
1832 .cb = str_random_distribution_cb,
1833 .help = "Random offset distribution generator",
1837 .oval = FIO_RAND_DIST_RANDOM,
1838 .help = "Completely random",
1841 .oval = FIO_RAND_DIST_ZIPF,
1842 .help = "Zipf distribution",
1845 .oval = FIO_RAND_DIST_PARETO,
1846 .help = "Pareto distribution",
1849 .category = FIO_OPT_C_IO,
1850 .group = FIO_OPT_G_RANDOM,
1853 .name = "percentage_random",
1854 .lname = "Percentage Random",
1855 .type = FIO_OPT_INT,
1856 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1857 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1858 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1860 .help = "Percentage of seq/random mix that should be random",
1861 .def = "100,100,100",
1863 .inverse = "percentage_sequential",
1864 .category = FIO_OPT_C_IO,
1865 .group = FIO_OPT_G_RANDOM,
1868 .name = "percentage_sequential",
1869 .lname = "Percentage Sequential",
1870 .type = FIO_OPT_DEPRECATED,
1871 .category = FIO_OPT_C_IO,
1872 .group = FIO_OPT_G_RANDOM,
1875 .name = "allrandrepeat",
1876 .type = FIO_OPT_BOOL,
1877 .off1 = td_var_offset(allrand_repeatable),
1878 .help = "Use repeatable random numbers for everything",
1880 .category = FIO_OPT_C_IO,
1881 .group = FIO_OPT_G_RANDOM,
1885 .lname = "Number of files",
1886 .alias = "nr_files",
1887 .type = FIO_OPT_INT,
1888 .off1 = td_var_offset(nr_files),
1889 .help = "Split job workload between this number of files",
1892 .category = FIO_OPT_C_FILE,
1893 .group = FIO_OPT_G_INVALID,
1896 .name = "openfiles",
1897 .lname = "Number of open files",
1898 .type = FIO_OPT_INT,
1899 .off1 = td_var_offset(open_files),
1900 .help = "Number of files to keep open at the same time",
1901 .category = FIO_OPT_C_FILE,
1902 .group = FIO_OPT_G_INVALID,
1905 .name = "file_service_type",
1906 .lname = "File service type",
1907 .type = FIO_OPT_STR,
1909 .off1 = td_var_offset(file_service_type),
1910 .help = "How to select which file to service next",
1911 .def = "roundrobin",
1912 .category = FIO_OPT_C_FILE,
1913 .group = FIO_OPT_G_INVALID,
1916 .oval = FIO_FSERVICE_RANDOM,
1917 .help = "Choose a file at random",
1919 { .ival = "roundrobin",
1920 .oval = FIO_FSERVICE_RR,
1921 .help = "Round robin select files",
1923 { .ival = "sequential",
1924 .oval = FIO_FSERVICE_SEQ,
1925 .help = "Finish one file before moving to the next",
1928 .parent = "nrfiles",
1931 #ifdef CONFIG_POSIX_FALLOCATE
1933 .name = "fallocate",
1934 .lname = "Fallocate",
1935 .type = FIO_OPT_STR,
1936 .off1 = td_var_offset(fallocate_mode),
1937 .help = "Whether pre-allocation is performed when laying out files",
1939 .category = FIO_OPT_C_FILE,
1940 .group = FIO_OPT_G_INVALID,
1943 .oval = FIO_FALLOCATE_NONE,
1944 .help = "Do not pre-allocate space",
1947 .oval = FIO_FALLOCATE_POSIX,
1948 .help = "Use posix_fallocate()",
1950 #ifdef CONFIG_LINUX_FALLOCATE
1952 .oval = FIO_FALLOCATE_KEEP_SIZE,
1953 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
1956 /* Compatibility with former boolean values */
1958 .oval = FIO_FALLOCATE_NONE,
1959 .help = "Alias for 'none'",
1962 .oval = FIO_FALLOCATE_POSIX,
1963 .help = "Alias for 'posix'",
1967 #endif /* CONFIG_POSIX_FALLOCATE */
1969 .name = "fadvise_hint",
1970 .lname = "Fadvise hint",
1971 .type = FIO_OPT_BOOL,
1972 .off1 = td_var_offset(fadvise_hint),
1973 .help = "Use fadvise() to advise the kernel on IO pattern",
1975 .category = FIO_OPT_C_FILE,
1976 .group = FIO_OPT_G_INVALID,
1981 .type = FIO_OPT_INT,
1982 .off1 = td_var_offset(fsync_blocks),
1983 .help = "Issue fsync for writes every given number of blocks",
1986 .category = FIO_OPT_C_FILE,
1987 .group = FIO_OPT_G_INVALID,
1990 .name = "fdatasync",
1991 .lname = "Fdatasync",
1992 .type = FIO_OPT_INT,
1993 .off1 = td_var_offset(fdatasync_blocks),
1994 .help = "Issue fdatasync for writes every given number of blocks",
1997 .category = FIO_OPT_C_FILE,
1998 .group = FIO_OPT_G_INVALID,
2001 .name = "write_barrier",
2002 .lname = "Write barrier",
2003 .type = FIO_OPT_INT,
2004 .off1 = td_var_offset(barrier_blocks),
2005 .help = "Make every Nth write a barrier write",
2008 .category = FIO_OPT_C_IO,
2009 .group = FIO_OPT_G_INVALID,
2011 #ifdef CONFIG_SYNC_FILE_RANGE
2013 .name = "sync_file_range",
2014 .lname = "Sync file range",
2016 { .ival = "wait_before",
2017 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
2018 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
2022 .oval = SYNC_FILE_RANGE_WRITE,
2023 .help = "SYNC_FILE_RANGE_WRITE",
2027 .ival = "wait_after",
2028 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
2029 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
2033 .type = FIO_OPT_STR_MULTI,
2035 .off1 = td_var_offset(sync_file_range),
2036 .help = "Use sync_file_range()",
2037 .category = FIO_OPT_C_FILE,
2038 .group = FIO_OPT_G_INVALID,
2043 .lname = "Direct I/O",
2044 .type = FIO_OPT_BOOL,
2045 .off1 = td_var_offset(odirect),
2046 .help = "Use O_DIRECT IO (negates buffered)",
2048 .inverse = "buffered",
2049 .category = FIO_OPT_C_IO,
2050 .group = FIO_OPT_G_IO_TYPE,
2054 .lname = "Atomic I/O",
2055 .type = FIO_OPT_BOOL,
2056 .off1 = td_var_offset(oatomic),
2057 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
2059 .category = FIO_OPT_C_IO,
2060 .group = FIO_OPT_G_IO_TYPE,
2064 .lname = "Buffered I/O",
2065 .type = FIO_OPT_BOOL,
2066 .off1 = td_var_offset(odirect),
2068 .help = "Use buffered IO (negates direct)",
2070 .inverse = "direct",
2071 .category = FIO_OPT_C_IO,
2072 .group = FIO_OPT_G_IO_TYPE,
2075 .name = "overwrite",
2076 .lname = "Overwrite",
2077 .type = FIO_OPT_BOOL,
2078 .off1 = td_var_offset(overwrite),
2079 .help = "When writing, set whether to overwrite current data",
2081 .category = FIO_OPT_C_FILE,
2082 .group = FIO_OPT_G_INVALID,
2087 .type = FIO_OPT_INT,
2088 .off1 = td_var_offset(loops),
2089 .help = "Number of times to run the job",
2092 .category = FIO_OPT_C_GENERAL,
2093 .group = FIO_OPT_G_RUNTIME,
2097 .lname = "Number of jobs",
2098 .type = FIO_OPT_INT,
2099 .off1 = td_var_offset(numjobs),
2100 .help = "Duplicate this job this many times",
2103 .category = FIO_OPT_C_GENERAL,
2104 .group = FIO_OPT_G_RUNTIME,
2107 .name = "startdelay",
2108 .lname = "Start delay",
2109 .type = FIO_OPT_STR_VAL_TIME,
2110 .off1 = td_var_offset(start_delay),
2111 .off2 = td_var_offset(start_delay_high),
2112 .help = "Only start job when this period has passed",
2115 .category = FIO_OPT_C_GENERAL,
2116 .group = FIO_OPT_G_RUNTIME,
2122 .type = FIO_OPT_STR_VAL_TIME,
2123 .off1 = td_var_offset(timeout),
2124 .help = "Stop workload when this amount of time has passed",
2127 .category = FIO_OPT_C_GENERAL,
2128 .group = FIO_OPT_G_RUNTIME,
2131 .name = "time_based",
2132 .lname = "Time based",
2133 .type = FIO_OPT_STR_SET,
2134 .off1 = td_var_offset(time_based),
2135 .help = "Keep running until runtime/timeout is met",
2136 .category = FIO_OPT_C_GENERAL,
2137 .group = FIO_OPT_G_RUNTIME,
2140 .name = "verify_only",
2141 .lname = "Verify only",
2142 .type = FIO_OPT_STR_SET,
2143 .off1 = td_var_offset(verify_only),
2144 .help = "Verifies previously written data is still valid",
2145 .category = FIO_OPT_C_GENERAL,
2146 .group = FIO_OPT_G_RUNTIME,
2149 .name = "ramp_time",
2150 .lname = "Ramp time",
2151 .type = FIO_OPT_STR_VAL_TIME,
2152 .off1 = td_var_offset(ramp_time),
2153 .help = "Ramp up time before measuring performance",
2155 .category = FIO_OPT_C_GENERAL,
2156 .group = FIO_OPT_G_RUNTIME,
2159 .name = "clocksource",
2160 .lname = "Clock source",
2161 .type = FIO_OPT_STR,
2162 .cb = fio_clock_source_cb,
2163 .off1 = td_var_offset(clocksource),
2164 .help = "What type of timing source to use",
2165 .category = FIO_OPT_C_GENERAL,
2166 .group = FIO_OPT_G_CLOCK,
2168 #ifdef CONFIG_GETTIMEOFDAY
2169 { .ival = "gettimeofday",
2171 .help = "Use gettimeofday(2) for timing",
2174 #ifdef CONFIG_CLOCK_GETTIME
2175 { .ival = "clock_gettime",
2176 .oval = CS_CGETTIME,
2177 .help = "Use clock_gettime(2) for timing",
2180 #ifdef ARCH_HAVE_CPU_CLOCK
2182 .oval = CS_CPUCLOCK,
2183 .help = "Use CPU private clock",
2191 .lname = "I/O Memory",
2192 .type = FIO_OPT_STR,
2194 .off1 = td_var_offset(mem_type),
2195 .help = "Backing type for IO buffers",
2197 .category = FIO_OPT_C_IO,
2198 .group = FIO_OPT_G_INVALID,
2202 .help = "Use malloc(3) for IO buffers",
2206 .help = "Use shared memory segments for IO buffers",
2208 #ifdef FIO_HAVE_HUGETLB
2209 { .ival = "shmhuge",
2210 .oval = MEM_SHMHUGE,
2211 .help = "Like shm, but use huge pages",
2216 .help = "Use mmap(2) (file or anon) for IO buffers",
2218 #ifdef FIO_HAVE_HUGETLB
2219 { .ival = "mmaphuge",
2220 .oval = MEM_MMAPHUGE,
2221 .help = "Like mmap, but use huge pages",
2227 .name = "iomem_align",
2228 .alias = "mem_align",
2229 .lname = "I/O memory alignment",
2230 .type = FIO_OPT_INT,
2231 .off1 = td_var_offset(mem_align),
2233 .help = "IO memory buffer offset alignment",
2237 .category = FIO_OPT_C_IO,
2238 .group = FIO_OPT_G_INVALID,
2243 .type = FIO_OPT_STR,
2244 .off1 = td_var_offset(verify),
2245 .help = "Verify data written",
2247 .category = FIO_OPT_C_IO,
2248 .group = FIO_OPT_G_VERIFY,
2251 .oval = VERIFY_NONE,
2252 .help = "Don't do IO verification",
2256 .help = "Use md5 checksums for verification",
2259 .oval = VERIFY_CRC64,
2260 .help = "Use crc64 checksums for verification",
2263 .oval = VERIFY_CRC32,
2264 .help = "Use crc32 checksums for verification",
2266 { .ival = "crc32c-intel",
2267 .oval = VERIFY_CRC32C,
2268 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2271 .oval = VERIFY_CRC32C,
2272 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2275 .oval = VERIFY_CRC16,
2276 .help = "Use crc16 checksums for verification",
2279 .oval = VERIFY_CRC7,
2280 .help = "Use crc7 checksums for verification",
2283 .oval = VERIFY_SHA1,
2284 .help = "Use sha1 checksums for verification",
2287 .oval = VERIFY_SHA256,
2288 .help = "Use sha256 checksums for verification",
2291 .oval = VERIFY_SHA512,
2292 .help = "Use sha512 checksums for verification",
2295 .oval = VERIFY_XXHASH,
2296 .help = "Use xxhash checksums for verification",
2299 .oval = VERIFY_META,
2300 .help = "Use io information",
2304 .oval = VERIFY_NULL,
2305 .help = "Pretend to verify",
2310 .name = "do_verify",
2311 .lname = "Perform verify step",
2312 .type = FIO_OPT_BOOL,
2313 .off1 = td_var_offset(do_verify),
2314 .help = "Run verification stage after write",
2318 .category = FIO_OPT_C_IO,
2319 .group = FIO_OPT_G_VERIFY,
2322 .name = "verifysort",
2323 .lname = "Verify sort",
2324 .type = FIO_OPT_BOOL,
2325 .off1 = td_var_offset(verifysort),
2326 .help = "Sort written verify blocks for read back",
2330 .category = FIO_OPT_C_IO,
2331 .group = FIO_OPT_G_VERIFY,
2334 .name = "verifysort_nr",
2335 .type = FIO_OPT_INT,
2336 .off1 = td_var_offset(verifysort_nr),
2337 .help = "Pre-load and sort verify blocks for a read workload",
2342 .category = FIO_OPT_C_IO,
2343 .group = FIO_OPT_G_VERIFY,
2346 .name = "verify_interval",
2347 .lname = "Verify interval",
2348 .type = FIO_OPT_INT,
2349 .off1 = td_var_offset(verify_interval),
2350 .minval = 2 * sizeof(struct verify_header),
2351 .help = "Store verify buffer header every N bytes",
2354 .interval = 2 * sizeof(struct verify_header),
2355 .category = FIO_OPT_C_IO,
2356 .group = FIO_OPT_G_VERIFY,
2359 .name = "verify_offset",
2360 .lname = "Verify offset",
2361 .type = FIO_OPT_INT,
2362 .help = "Offset verify header location by N bytes",
2363 .off1 = td_var_offset(verify_offset),
2364 .minval = sizeof(struct verify_header),
2367 .category = FIO_OPT_C_IO,
2368 .group = FIO_OPT_G_VERIFY,
2371 .name = "verify_pattern",
2372 .lname = "Verify pattern",
2373 .type = FIO_OPT_STR,
2374 .cb = str_verify_pattern_cb,
2375 .help = "Fill pattern for IO buffers",
2378 .category = FIO_OPT_C_IO,
2379 .group = FIO_OPT_G_VERIFY,
2382 .name = "verify_fatal",
2383 .lname = "Verify fatal",
2384 .type = FIO_OPT_BOOL,
2385 .off1 = td_var_offset(verify_fatal),
2387 .help = "Exit on a single verify failure, don't continue",
2390 .category = FIO_OPT_C_IO,
2391 .group = FIO_OPT_G_VERIFY,
2394 .name = "verify_dump",
2395 .lname = "Verify dump",
2396 .type = FIO_OPT_BOOL,
2397 .off1 = td_var_offset(verify_dump),
2399 .help = "Dump contents of good and bad blocks on failure",
2402 .category = FIO_OPT_C_IO,
2403 .group = FIO_OPT_G_VERIFY,
2406 .name = "verify_async",
2407 .lname = "Verify asynchronously",
2408 .type = FIO_OPT_INT,
2409 .off1 = td_var_offset(verify_async),
2411 .help = "Number of async verifier threads to use",
2414 .category = FIO_OPT_C_IO,
2415 .group = FIO_OPT_G_VERIFY,
2418 .name = "verify_backlog",
2419 .lname = "Verify backlog",
2420 .type = FIO_OPT_STR_VAL,
2421 .off1 = td_var_offset(verify_backlog),
2422 .help = "Verify after this number of blocks are written",
2425 .category = FIO_OPT_C_IO,
2426 .group = FIO_OPT_G_VERIFY,
2429 .name = "verify_backlog_batch",
2430 .lname = "Verify backlog batch",
2431 .type = FIO_OPT_INT,
2432 .off1 = td_var_offset(verify_batch),
2433 .help = "Verify this number of IO blocks",
2436 .category = FIO_OPT_C_IO,
2437 .group = FIO_OPT_G_VERIFY,
2439 #ifdef FIO_HAVE_CPU_AFFINITY
2441 .name = "verify_async_cpus",
2442 .lname = "Async verify CPUs",
2443 .type = FIO_OPT_STR,
2444 .cb = str_verify_cpus_allowed_cb,
2445 .help = "Set CPUs allowed for async verify threads",
2446 .parent = "verify_async",
2448 .category = FIO_OPT_C_IO,
2449 .group = FIO_OPT_G_VERIFY,
2453 .name = "experimental_verify",
2454 .off1 = td_var_offset(experimental_verify),
2455 .type = FIO_OPT_BOOL,
2456 .help = "Enable experimental verification",
2457 .category = FIO_OPT_C_IO,
2458 .group = FIO_OPT_G_VERIFY,
2460 #ifdef FIO_HAVE_TRIM
2462 .name = "trim_percentage",
2463 .lname = "Trim percentage",
2464 .type = FIO_OPT_INT,
2465 .off1 = td_var_offset(trim_percentage),
2468 .help = "Number of verify blocks to discard/trim",
2473 .category = FIO_OPT_C_IO,
2474 .group = FIO_OPT_G_TRIM,
2477 .name = "trim_verify_zero",
2478 .lname = "Verify trim zero",
2479 .type = FIO_OPT_BOOL,
2480 .help = "Verify that trim/discarded blocks are returned as zeroes",
2481 .off1 = td_var_offset(trim_zero),
2482 .parent = "trim_percentage",
2485 .category = FIO_OPT_C_IO,
2486 .group = FIO_OPT_G_TRIM,
2489 .name = "trim_backlog",
2490 .lname = "Trim backlog",
2491 .type = FIO_OPT_STR_VAL,
2492 .off1 = td_var_offset(trim_backlog),
2493 .help = "Trim after this number of blocks are written",
2494 .parent = "trim_percentage",
2497 .category = FIO_OPT_C_IO,
2498 .group = FIO_OPT_G_TRIM,
2501 .name = "trim_backlog_batch",
2502 .lname = "Trim backlog batch",
2503 .type = FIO_OPT_INT,
2504 .off1 = td_var_offset(trim_batch),
2505 .help = "Trim this number of IO blocks",
2506 .parent = "trim_percentage",
2509 .category = FIO_OPT_C_IO,
2510 .group = FIO_OPT_G_TRIM,
2514 .name = "write_iolog",
2515 .lname = "Write I/O log",
2516 .type = FIO_OPT_STR_STORE,
2517 .off1 = td_var_offset(write_iolog_file),
2518 .help = "Store IO pattern to file",
2519 .category = FIO_OPT_C_IO,
2520 .group = FIO_OPT_G_IOLOG,
2523 .name = "read_iolog",
2524 .lname = "Read I/O log",
2525 .type = FIO_OPT_STR_STORE,
2526 .off1 = td_var_offset(read_iolog_file),
2527 .help = "Playback IO pattern from file",
2528 .category = FIO_OPT_C_IO,
2529 .group = FIO_OPT_G_IOLOG,
2532 .name = "replay_no_stall",
2533 .lname = "Don't stall on replay",
2534 .type = FIO_OPT_BOOL,
2535 .off1 = td_var_offset(no_stall),
2537 .parent = "read_iolog",
2539 .help = "Playback IO pattern file as fast as possible without stalls",
2540 .category = FIO_OPT_C_IO,
2541 .group = FIO_OPT_G_IOLOG,
2544 .name = "replay_redirect",
2545 .lname = "Redirect device for replay",
2546 .type = FIO_OPT_STR_STORE,
2547 .off1 = td_var_offset(replay_redirect),
2548 .parent = "read_iolog",
2550 .help = "Replay all I/O onto this device, regardless of trace device",
2551 .category = FIO_OPT_C_IO,
2552 .group = FIO_OPT_G_IOLOG,
2555 .name = "exec_prerun",
2556 .lname = "Pre-execute runnable",
2557 .type = FIO_OPT_STR_STORE,
2558 .off1 = td_var_offset(exec_prerun),
2559 .help = "Execute this file prior to running job",
2560 .category = FIO_OPT_C_GENERAL,
2561 .group = FIO_OPT_G_INVALID,
2564 .name = "exec_postrun",
2565 .lname = "Post-execute runnable",
2566 .type = FIO_OPT_STR_STORE,
2567 .off1 = td_var_offset(exec_postrun),
2568 .help = "Execute this file after running job",
2569 .category = FIO_OPT_C_GENERAL,
2570 .group = FIO_OPT_G_INVALID,
2572 #ifdef FIO_HAVE_IOSCHED_SWITCH
2574 .name = "ioscheduler",
2575 .lname = "I/O scheduler",
2576 .type = FIO_OPT_STR_STORE,
2577 .off1 = td_var_offset(ioscheduler),
2578 .help = "Use this IO scheduler on the backing device",
2579 .category = FIO_OPT_C_FILE,
2580 .group = FIO_OPT_G_INVALID,
2585 .lname = "Zone size",
2586 .type = FIO_OPT_STR_VAL,
2587 .off1 = td_var_offset(zone_size),
2588 .help = "Amount of data to read per zone",
2590 .interval = 1024 * 1024,
2591 .category = FIO_OPT_C_IO,
2592 .group = FIO_OPT_G_ZONE,
2595 .name = "zonerange",
2596 .lname = "Zone range",
2597 .type = FIO_OPT_STR_VAL,
2598 .off1 = td_var_offset(zone_range),
2599 .help = "Give size of an IO zone",
2601 .interval = 1024 * 1024,
2602 .category = FIO_OPT_C_IO,
2603 .group = FIO_OPT_G_ZONE,
2607 .lname = "Zone skip",
2608 .type = FIO_OPT_STR_VAL,
2609 .off1 = td_var_offset(zone_skip),
2610 .help = "Space between IO zones",
2612 .interval = 1024 * 1024,
2613 .category = FIO_OPT_C_IO,
2614 .group = FIO_OPT_G_ZONE,
2618 .lname = "Lock memory",
2619 .type = FIO_OPT_STR_VAL,
2620 .off1 = td_var_offset(lockmem),
2621 .help = "Lock down this amount of memory (per worker)",
2623 .interval = 1024 * 1024,
2624 .category = FIO_OPT_C_GENERAL,
2625 .group = FIO_OPT_G_INVALID,
2628 .name = "rwmixread",
2629 .lname = "Read/write mix read",
2630 .type = FIO_OPT_INT,
2631 .cb = str_rwmix_read_cb,
2633 .help = "Percentage of mixed workload that is reads",
2636 .inverse = "rwmixwrite",
2637 .category = FIO_OPT_C_IO,
2638 .group = FIO_OPT_G_RWMIX,
2641 .name = "rwmixwrite",
2642 .lname = "Read/write mix write",
2643 .type = FIO_OPT_INT,
2644 .cb = str_rwmix_write_cb,
2646 .help = "Percentage of mixed workload that is writes",
2649 .inverse = "rwmixread",
2650 .category = FIO_OPT_C_IO,
2651 .group = FIO_OPT_G_RWMIX,
2654 .name = "rwmixcycle",
2655 .lname = "Read/write mix cycle",
2656 .type = FIO_OPT_DEPRECATED,
2657 .category = FIO_OPT_C_IO,
2658 .group = FIO_OPT_G_RWMIX,
2663 .type = FIO_OPT_INT,
2664 .off1 = td_var_offset(nice),
2665 .help = "Set job CPU nice value",
2670 .category = FIO_OPT_C_GENERAL,
2671 .group = FIO_OPT_G_CRED,
2673 #ifdef FIO_HAVE_IOPRIO
2676 .lname = "I/O nice priority",
2677 .type = FIO_OPT_INT,
2678 .off1 = td_var_offset(ioprio),
2679 .help = "Set job IO priority value",
2683 .category = FIO_OPT_C_GENERAL,
2684 .group = FIO_OPT_G_CRED,
2687 .name = "prioclass",
2688 .lname = "I/O nice priority class",
2689 .type = FIO_OPT_INT,
2690 .off1 = td_var_offset(ioprio_class),
2691 .help = "Set job IO priority class",
2695 .category = FIO_OPT_C_GENERAL,
2696 .group = FIO_OPT_G_CRED,
2700 .name = "thinktime",
2701 .lname = "Thinktime",
2702 .type = FIO_OPT_INT,
2703 .off1 = td_var_offset(thinktime),
2704 .help = "Idle time between IO buffers (usec)",
2706 .category = FIO_OPT_C_IO,
2707 .group = FIO_OPT_G_THINKTIME,
2710 .name = "thinktime_spin",
2711 .lname = "Thinktime spin",
2712 .type = FIO_OPT_INT,
2713 .off1 = td_var_offset(thinktime_spin),
2714 .help = "Start think time by spinning this amount (usec)",
2716 .parent = "thinktime",
2718 .category = FIO_OPT_C_IO,
2719 .group = FIO_OPT_G_THINKTIME,
2722 .name = "thinktime_blocks",
2723 .lname = "Thinktime blocks",
2724 .type = FIO_OPT_INT,
2725 .off1 = td_var_offset(thinktime_blocks),
2726 .help = "IO buffer period between 'thinktime'",
2728 .parent = "thinktime",
2730 .category = FIO_OPT_C_IO,
2731 .group = FIO_OPT_G_THINKTIME,
2735 .lname = "I/O rate",
2736 .type = FIO_OPT_INT,
2737 .off1 = td_var_offset(rate[DDIR_READ]),
2738 .off2 = td_var_offset(rate[DDIR_WRITE]),
2739 .off3 = td_var_offset(rate[DDIR_TRIM]),
2740 .help = "Set bandwidth rate",
2741 .category = FIO_OPT_C_IO,
2742 .group = FIO_OPT_G_RATE,
2746 .lname = "I/O min rate",
2747 .type = FIO_OPT_INT,
2748 .off1 = td_var_offset(ratemin[DDIR_READ]),
2749 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2750 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2751 .help = "Job must meet this rate or it will be shutdown",
2754 .category = FIO_OPT_C_IO,
2755 .group = FIO_OPT_G_RATE,
2758 .name = "rate_iops",
2759 .lname = "I/O rate IOPS",
2760 .type = FIO_OPT_INT,
2761 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2762 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2763 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2764 .help = "Limit IO used to this number of IO operations/sec",
2766 .category = FIO_OPT_C_IO,
2767 .group = FIO_OPT_G_RATE,
2770 .name = "rate_iops_min",
2771 .lname = "I/O min rate IOPS",
2772 .type = FIO_OPT_INT,
2773 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2774 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2775 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2776 .help = "Job must meet this rate or it will be shut down",
2777 .parent = "rate_iops",
2779 .category = FIO_OPT_C_IO,
2780 .group = FIO_OPT_G_RATE,
2783 .name = "ratecycle",
2784 .lname = "I/O rate cycle",
2785 .type = FIO_OPT_INT,
2786 .off1 = td_var_offset(ratecycle),
2787 .help = "Window average for rate limits (msec)",
2791 .category = FIO_OPT_C_IO,
2792 .group = FIO_OPT_G_RATE,
2795 .name = "max_latency",
2796 .type = FIO_OPT_INT,
2797 .off1 = td_var_offset(max_latency),
2798 .help = "Maximum tolerated IO latency (usec)",
2799 .category = FIO_OPT_C_IO,
2800 .group = FIO_OPT_G_LATPROF,
2803 .name = "latency_target",
2804 .lname = "Latency Target (usec)",
2805 .type = FIO_OPT_STR_VAL_TIME,
2806 .off1 = td_var_offset(latency_target),
2807 .help = "Ramp to max queue depth supporting this latency",
2808 .category = FIO_OPT_C_IO,
2809 .group = FIO_OPT_G_LATPROF,
2812 .name = "latency_window",
2813 .lname = "Latency Window (usec)",
2814 .type = FIO_OPT_STR_VAL_TIME,
2815 .off1 = td_var_offset(latency_window),
2816 .help = "Time to sustain latency_target",
2817 .category = FIO_OPT_C_IO,
2818 .group = FIO_OPT_G_LATPROF,
2821 .name = "latency_percentile",
2822 .lname = "Latency Percentile",
2823 .type = FIO_OPT_FLOAT_LIST,
2824 .off1 = td_var_offset(latency_percentile),
2825 .help = "Percentile of IOs must be below latency_target",
2830 .category = FIO_OPT_C_IO,
2831 .group = FIO_OPT_G_LATPROF,
2834 .name = "invalidate",
2835 .lname = "Cache invalidate",
2836 .type = FIO_OPT_BOOL,
2837 .off1 = td_var_offset(invalidate_cache),
2838 .help = "Invalidate buffer/page cache prior to running job",
2840 .category = FIO_OPT_C_IO,
2841 .group = FIO_OPT_G_IO_TYPE,
2845 .lname = "Synchronous I/O",
2846 .type = FIO_OPT_BOOL,
2847 .off1 = td_var_offset(sync_io),
2848 .help = "Use O_SYNC for buffered writes",
2850 .parent = "buffered",
2852 .category = FIO_OPT_C_IO,
2853 .group = FIO_OPT_G_IO_TYPE,
2856 .name = "create_serialize",
2857 .lname = "Create serialize",
2858 .type = FIO_OPT_BOOL,
2859 .off1 = td_var_offset(create_serialize),
2860 .help = "Serialize creating of job files",
2862 .category = FIO_OPT_C_FILE,
2863 .group = FIO_OPT_G_INVALID,
2866 .name = "create_fsync",
2867 .lname = "Create fsync",
2868 .type = FIO_OPT_BOOL,
2869 .off1 = td_var_offset(create_fsync),
2870 .help = "fsync file after creation",
2872 .category = FIO_OPT_C_FILE,
2873 .group = FIO_OPT_G_INVALID,
2876 .name = "create_on_open",
2877 .lname = "Create on open",
2878 .type = FIO_OPT_BOOL,
2879 .off1 = td_var_offset(create_on_open),
2880 .help = "Create files when they are opened for IO",
2882 .category = FIO_OPT_C_FILE,
2883 .group = FIO_OPT_G_INVALID,
2886 .name = "create_only",
2887 .type = FIO_OPT_BOOL,
2888 .off1 = td_var_offset(create_only),
2889 .help = "Only perform file creation phase",
2890 .category = FIO_OPT_C_FILE,
2895 .lname = "Pre-read files",
2896 .type = FIO_OPT_BOOL,
2897 .off1 = td_var_offset(pre_read),
2898 .help = "Pre-read files before starting official testing",
2900 .category = FIO_OPT_C_FILE,
2901 .group = FIO_OPT_G_INVALID,
2903 #ifdef FIO_HAVE_CPU_AFFINITY
2906 .lname = "CPU mask",
2907 .type = FIO_OPT_INT,
2908 .cb = str_cpumask_cb,
2909 .help = "CPU affinity mask",
2910 .category = FIO_OPT_C_GENERAL,
2911 .group = FIO_OPT_G_CRED,
2914 .name = "cpus_allowed",
2915 .lname = "CPUs allowed",
2916 .type = FIO_OPT_STR,
2917 .cb = str_cpus_allowed_cb,
2918 .help = "Set CPUs allowed",
2919 .category = FIO_OPT_C_GENERAL,
2920 .group = FIO_OPT_G_CRED,
2923 .name = "cpus_allowed_policy",
2924 .lname = "CPUs allowed distribution policy",
2925 .type = FIO_OPT_STR,
2926 .off1 = td_var_offset(cpus_allowed_policy),
2927 .help = "Distribution policy for cpus_allowed",
2928 .parent = "cpus_allowed",
2932 .oval = FIO_CPUS_SHARED,
2933 .help = "Mask shared between threads",
2936 .oval = FIO_CPUS_SPLIT,
2937 .help = "Mask split between threads",
2940 .category = FIO_OPT_C_GENERAL,
2941 .group = FIO_OPT_G_CRED,
2944 #ifdef CONFIG_LIBNUMA
2946 .name = "numa_cpu_nodes",
2947 .type = FIO_OPT_STR,
2948 .cb = str_numa_cpunodes_cb,
2949 .help = "NUMA CPU nodes bind",
2950 .category = FIO_OPT_C_GENERAL,
2951 .group = FIO_OPT_G_INVALID,
2954 .name = "numa_mem_policy",
2955 .type = FIO_OPT_STR,
2956 .cb = str_numa_mpol_cb,
2957 .help = "NUMA memory policy setup",
2958 .category = FIO_OPT_C_GENERAL,
2959 .group = FIO_OPT_G_INVALID,
2963 .name = "end_fsync",
2964 .lname = "End fsync",
2965 .type = FIO_OPT_BOOL,
2966 .off1 = td_var_offset(end_fsync),
2967 .help = "Include fsync at the end of job",
2969 .category = FIO_OPT_C_FILE,
2970 .group = FIO_OPT_G_INVALID,
2973 .name = "fsync_on_close",
2974 .lname = "Fsync on close",
2975 .type = FIO_OPT_BOOL,
2976 .off1 = td_var_offset(fsync_on_close),
2977 .help = "fsync files on close",
2979 .category = FIO_OPT_C_FILE,
2980 .group = FIO_OPT_G_INVALID,
2984 .lname = "Unlink file",
2985 .type = FIO_OPT_BOOL,
2986 .off1 = td_var_offset(unlink),
2987 .help = "Unlink created files after job has completed",
2989 .category = FIO_OPT_C_FILE,
2990 .group = FIO_OPT_G_INVALID,
2994 .lname = "Exit-all on terminate",
2995 .type = FIO_OPT_STR_SET,
2996 .cb = str_exitall_cb,
2997 .help = "Terminate all jobs when one exits",
2998 .category = FIO_OPT_C_GENERAL,
2999 .group = FIO_OPT_G_PROCESS,
3002 .name = "stonewall",
3003 .lname = "Wait for previous",
3004 .alias = "wait_for_previous",
3005 .type = FIO_OPT_STR_SET,
3006 .off1 = td_var_offset(stonewall),
3007 .help = "Insert a hard barrier between this job and previous",
3008 .category = FIO_OPT_C_GENERAL,
3009 .group = FIO_OPT_G_PROCESS,
3012 .name = "new_group",
3013 .lname = "New group",
3014 .type = FIO_OPT_STR_SET,
3015 .off1 = td_var_offset(new_group),
3016 .help = "Mark the start of a new group (for reporting)",
3017 .category = FIO_OPT_C_GENERAL,
3018 .group = FIO_OPT_G_PROCESS,
3023 .type = FIO_OPT_STR_SET,
3024 .off1 = td_var_offset(use_thread),
3025 .help = "Use threads instead of processes",
3026 .category = FIO_OPT_C_GENERAL,
3027 .group = FIO_OPT_G_PROCESS,
3030 .name = "write_bw_log",
3031 .lname = "Write bandwidth log",
3032 .type = FIO_OPT_STR_STORE,
3033 .off1 = td_var_offset(bw_log_file),
3034 .help = "Write log of bandwidth during run",
3035 .category = FIO_OPT_C_LOG,
3036 .group = FIO_OPT_G_INVALID,
3039 .name = "write_lat_log",
3040 .lname = "Write latency log",
3041 .type = FIO_OPT_STR_STORE,
3042 .off1 = td_var_offset(lat_log_file),
3043 .help = "Write log of latency during run",
3044 .category = FIO_OPT_C_LOG,
3045 .group = FIO_OPT_G_INVALID,
3048 .name = "write_iops_log",
3049 .lname = "Write IOPS log",
3050 .type = FIO_OPT_STR_STORE,
3051 .off1 = td_var_offset(iops_log_file),
3052 .help = "Write log of IOPS during run",
3053 .category = FIO_OPT_C_LOG,
3054 .group = FIO_OPT_G_INVALID,
3057 .name = "log_avg_msec",
3058 .lname = "Log averaging (msec)",
3059 .type = FIO_OPT_INT,
3060 .off1 = td_var_offset(log_avg_msec),
3061 .help = "Average bw/iops/lat logs over this period of time",
3063 .category = FIO_OPT_C_LOG,
3064 .group = FIO_OPT_G_INVALID,
3067 .name = "bwavgtime",
3068 .lname = "Bandwidth average time",
3069 .type = FIO_OPT_INT,
3070 .off1 = td_var_offset(bw_avg_time),
3071 .help = "Time window over which to calculate bandwidth"
3074 .parent = "write_bw_log",
3077 .category = FIO_OPT_C_LOG,
3078 .group = FIO_OPT_G_INVALID,
3081 .name = "iopsavgtime",
3082 .lname = "IOPS average time",
3083 .type = FIO_OPT_INT,
3084 .off1 = td_var_offset(iops_avg_time),
3085 .help = "Time window over which to calculate IOPS (msec)",
3087 .parent = "write_iops_log",
3090 .category = FIO_OPT_C_LOG,
3091 .group = FIO_OPT_G_INVALID,
3094 .name = "group_reporting",
3095 .lname = "Group reporting",
3096 .type = FIO_OPT_STR_SET,
3097 .off1 = td_var_offset(group_reporting),
3098 .help = "Do reporting on a per-group basis",
3099 .category = FIO_OPT_C_STAT,
3100 .group = FIO_OPT_G_INVALID,
3103 .name = "zero_buffers",
3104 .lname = "Zero I/O buffers",
3105 .type = FIO_OPT_STR_SET,
3106 .off1 = td_var_offset(zero_buffers),
3107 .help = "Init IO buffers to all zeroes",
3108 .category = FIO_OPT_C_IO,
3109 .group = FIO_OPT_G_IO_BUF,
3112 .name = "refill_buffers",
3113 .lname = "Refill I/O buffers",
3114 .type = FIO_OPT_STR_SET,
3115 .off1 = td_var_offset(refill_buffers),
3116 .help = "Refill IO buffers on every IO submit",
3117 .category = FIO_OPT_C_IO,
3118 .group = FIO_OPT_G_IO_BUF,
3121 .name = "scramble_buffers",
3122 .lname = "Scramble I/O buffers",
3123 .type = FIO_OPT_BOOL,
3124 .off1 = td_var_offset(scramble_buffers),
3125 .help = "Slightly scramble buffers on every IO submit",
3127 .category = FIO_OPT_C_IO,
3128 .group = FIO_OPT_G_IO_BUF,
3131 .name = "buffer_pattern",
3132 .lname = "Buffer pattern",
3133 .type = FIO_OPT_STR,
3134 .cb = str_buffer_pattern_cb,
3135 .help = "Fill pattern for IO buffers",
3136 .category = FIO_OPT_C_IO,
3137 .group = FIO_OPT_G_IO_BUF,
3140 .name = "buffer_compress_percentage",
3141 .lname = "Buffer compression percentage",
3142 .type = FIO_OPT_INT,
3143 .cb = str_buffer_compress_cb,
3146 .help = "How compressible the buffer is (approximately)",
3148 .category = FIO_OPT_C_IO,
3149 .group = FIO_OPT_G_IO_BUF,
3152 .name = "buffer_compress_chunk",
3153 .lname = "Buffer compression chunk size",
3154 .type = FIO_OPT_INT,
3155 .off1 = td_var_offset(compress_chunk),
3156 .parent = "buffer_compress_percentage",
3158 .help = "Size of compressible region in buffer",
3160 .category = FIO_OPT_C_IO,
3161 .group = FIO_OPT_G_IO_BUF,
3164 .name = "clat_percentiles",
3165 .lname = "Completion latency percentiles",
3166 .type = FIO_OPT_BOOL,
3167 .off1 = td_var_offset(clat_percentiles),
3168 .help = "Enable the reporting of completion latency percentiles",
3170 .category = FIO_OPT_C_STAT,
3171 .group = FIO_OPT_G_INVALID,
3174 .name = "percentile_list",
3175 .lname = "Completion latency percentile list",
3176 .type = FIO_OPT_FLOAT_LIST,
3177 .off1 = td_var_offset(percentile_list),
3178 .off2 = td_var_offset(percentile_precision),
3179 .help = "Specify a custom list of percentiles to report",
3180 .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99",
3181 .maxlen = FIO_IO_U_LIST_MAX_LEN,
3184 .category = FIO_OPT_C_STAT,
3185 .group = FIO_OPT_G_INVALID,
3188 #ifdef FIO_HAVE_DISK_UTIL
3190 .name = "disk_util",
3191 .lname = "Disk utilization",
3192 .type = FIO_OPT_BOOL,
3193 .off1 = td_var_offset(do_disk_util),
3194 .help = "Log disk utilization statistics",
3196 .category = FIO_OPT_C_STAT,
3197 .group = FIO_OPT_G_INVALID,
3201 .name = "gtod_reduce",
3202 .lname = "Reduce gettimeofday() calls",
3203 .type = FIO_OPT_BOOL,
3204 .help = "Greatly reduce number of gettimeofday() calls",
3205 .cb = str_gtod_reduce_cb,
3208 .category = FIO_OPT_C_STAT,
3209 .group = FIO_OPT_G_INVALID,
3212 .name = "disable_lat",
3213 .lname = "Disable all latency stats",
3214 .type = FIO_OPT_BOOL,
3215 .off1 = td_var_offset(disable_lat),
3216 .help = "Disable latency numbers",
3217 .parent = "gtod_reduce",
3220 .category = FIO_OPT_C_STAT,
3221 .group = FIO_OPT_G_INVALID,
3224 .name = "disable_clat",
3225 .lname = "Disable completion latency stats",
3226 .type = FIO_OPT_BOOL,
3227 .off1 = td_var_offset(disable_clat),
3228 .help = "Disable completion latency numbers",
3229 .parent = "gtod_reduce",
3232 .category = FIO_OPT_C_STAT,
3233 .group = FIO_OPT_G_INVALID,
3236 .name = "disable_slat",
3237 .lname = "Disable submission latency stats",
3238 .type = FIO_OPT_BOOL,
3239 .off1 = td_var_offset(disable_slat),
3240 .help = "Disable submission latency numbers",
3241 .parent = "gtod_reduce",
3244 .category = FIO_OPT_C_STAT,
3245 .group = FIO_OPT_G_INVALID,
3248 .name = "disable_bw_measurement",
3249 .lname = "Disable bandwidth stats",
3250 .type = FIO_OPT_BOOL,
3251 .off1 = td_var_offset(disable_bw),
3252 .help = "Disable bandwidth logging",
3253 .parent = "gtod_reduce",
3256 .category = FIO_OPT_C_STAT,
3257 .group = FIO_OPT_G_INVALID,
3261 .lname = "Dedicated gettimeofday() CPU",
3262 .type = FIO_OPT_INT,
3263 .cb = str_gtod_cpu_cb,
3264 .help = "Set up dedicated gettimeofday() thread on this CPU",
3265 .verify = gtod_cpu_verify,
3266 .category = FIO_OPT_C_GENERAL,
3267 .group = FIO_OPT_G_CLOCK,
3270 .name = "unified_rw_reporting",
3271 .type = FIO_OPT_BOOL,
3272 .off1 = td_var_offset(unified_rw_rep),
3273 .help = "Unify reporting across data direction",
3275 .category = FIO_OPT_C_GENERAL,
3276 .group = FIO_OPT_G_INVALID,
3279 .name = "continue_on_error",
3280 .lname = "Continue on error",
3281 .type = FIO_OPT_STR,
3282 .off1 = td_var_offset(continue_on_error),
3283 .help = "Continue on non-fatal errors during IO",
3285 .category = FIO_OPT_C_GENERAL,
3286 .group = FIO_OPT_G_ERR,
3289 .oval = ERROR_TYPE_NONE,
3290 .help = "Exit when an error is encountered",
3293 .oval = ERROR_TYPE_READ,
3294 .help = "Continue on read errors only",
3297 .oval = ERROR_TYPE_WRITE,
3298 .help = "Continue on write errors only",
3301 .oval = ERROR_TYPE_READ | ERROR_TYPE_WRITE,
3302 .help = "Continue on any IO errors",
3305 .oval = ERROR_TYPE_VERIFY,
3306 .help = "Continue on verify errors only",
3309 .oval = ERROR_TYPE_ANY,
3310 .help = "Continue on all io and verify errors",
3313 .oval = ERROR_TYPE_NONE,
3314 .help = "Alias for 'none'",
3317 .oval = ERROR_TYPE_ANY,
3318 .help = "Alias for 'all'",
3323 .name = "ignore_error",
3324 .type = FIO_OPT_STR,
3325 .cb = str_ignore_error_cb,
3326 .help = "Set a specific list of errors to ignore",
3328 .category = FIO_OPT_C_GENERAL,
3329 .group = FIO_OPT_G_ERR,
3332 .name = "error_dump",
3333 .type = FIO_OPT_BOOL,
3334 .off1 = td_var_offset(error_dump),
3336 .help = "Dump info on each error",
3337 .category = FIO_OPT_C_GENERAL,
3338 .group = FIO_OPT_G_ERR,
3343 .type = FIO_OPT_STR_STORE,
3344 .off1 = td_var_offset(profile),
3345 .help = "Select a specific builtin performance test",
3346 .category = FIO_OPT_C_PROFILE,
3347 .group = FIO_OPT_G_INVALID,
3352 .type = FIO_OPT_STR_STORE,
3353 .off1 = td_var_offset(cgroup),
3354 .help = "Add job to cgroup of this name",
3355 .category = FIO_OPT_C_GENERAL,
3356 .group = FIO_OPT_G_CGROUP,
3359 .name = "cgroup_nodelete",
3360 .lname = "Cgroup no-delete",