11 #include <netinet/in.h>
19 #include "crc/crc32c.h"
21 char client_sockaddr_str[INET6_ADDRSTRLEN] = { 0 };
24 * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
26 static char *get_opt_postfix(const char *str)
28 char *p = strstr(str, ":");
34 strip_blank_front(&p);
39 static int converthexchartoint(char a)
59 static int bs_cmp(const void *p1, const void *p2)
61 const struct bssplit *bsp1 = p1;
62 const struct bssplit *bsp2 = p2;
64 return bsp1->perc < bsp2->perc;
67 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
69 struct bssplit *bssplit;
70 unsigned int i, perc, perc_missing;
71 unsigned int max_bs, min_bs;
75 o->bssplit_nr[ddir] = 4;
76 bssplit = malloc(4 * sizeof(struct bssplit));
81 while ((fname = strsep(&str, ":")) != NULL) {
88 * grow struct buffer, if needed
90 if (i == o->bssplit_nr[ddir]) {
91 o->bssplit_nr[ddir] <<= 1;
92 bssplit = realloc(bssplit, o->bssplit_nr[ddir]
93 * sizeof(struct bssplit));
96 perc_str = strstr(fname, "/");
100 perc = atoi(perc_str);
108 if (str_to_decimal(fname, &val, 1, o, 0, 0)) {
109 log_err("fio: bssplit conversion failed\n");
120 bssplit[i].perc = perc;
124 o->bssplit_nr[ddir] = i;
127 * Now check if the percentages add up, and how much is missing
129 perc = perc_missing = 0;
130 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
131 struct bssplit *bsp = &bssplit[i];
133 if (bsp->perc == -1U)
139 if (perc > 100 && perc_missing > 1) {
140 log_err("fio: bssplit percentages add to more than 100%%\n");
146 * If values didn't have a percentage set, divide the remains between
150 if (perc_missing == 1 && o->bssplit_nr[ddir] == 1)
152 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
153 struct bssplit *bsp = &bssplit[i];
155 if (bsp->perc == -1U)
156 bsp->perc = (100 - perc) / perc_missing;
160 o->min_bs[ddir] = min_bs;
161 o->max_bs[ddir] = max_bs;
164 * now sort based on percentages, for ease of lookup
166 qsort(bssplit, o->bssplit_nr[ddir], sizeof(struct bssplit), bs_cmp);
167 o->bssplit[ddir] = bssplit;
171 static int str_bssplit_cb(void *data, const char *input)
173 struct thread_data *td = data;
174 char *str, *p, *odir, *ddir;
180 p = str = strdup(input);
182 strip_blank_front(&str);
183 strip_blank_end(str);
185 odir = strchr(str, ',');
187 ddir = strchr(odir + 1, ',');
189 ret = bssplit_ddir(&td->o, DDIR_TRIM, ddir + 1);
195 op = strdup(odir + 1);
196 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
201 ret = bssplit_ddir(&td->o, DDIR_WRITE, odir + 1);
204 ret = bssplit_ddir(&td->o, DDIR_READ, str);
210 ret = bssplit_ddir(&td->o, DDIR_WRITE, op);
215 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
218 ret = bssplit_ddir(&td->o, DDIR_READ, str);
225 static int str2error(char *str)
227 const char *err[] = { "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO",
228 "ENXIO", "E2BIG", "ENOEXEC", "EBADF",
229 "ECHILD", "EAGAIN", "ENOMEM", "EACCES",
230 "EFAULT", "ENOTBLK", "EBUSY", "EEXIST",
231 "EXDEV", "ENODEV", "ENOTDIR", "EISDIR",
232 "EINVAL", "ENFILE", "EMFILE", "ENOTTY",
233 "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE",
234 "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" };
235 int i = 0, num = sizeof(err) / sizeof(void *);
238 if (!strcmp(err[i], str))
245 static int ignore_error_type(struct thread_data *td, int etype, char *str)
251 if (etype >= ERROR_TYPE_CNT) {
252 log_err("Illegal error type\n");
256 td->o.ignore_error_nr[etype] = 4;
257 error = malloc(4 * sizeof(struct bssplit));
260 while ((fname = strsep(&str, ":")) != NULL) {
266 * grow struct buffer, if needed
268 if (i == td->o.ignore_error_nr[etype]) {
269 td->o.ignore_error_nr[etype] <<= 1;
270 error = realloc(error, td->o.ignore_error_nr[etype]
273 if (fname[0] == 'E') {
274 error[i] = str2error(fname);
276 error[i] = atoi(fname);
278 error[i] = -error[i];
281 log_err("Unknown error %s, please use number value \n",
289 td->o.continue_on_error |= 1 << etype;
290 td->o.ignore_error_nr[etype] = i;
291 td->o.ignore_error[etype] = error;
299 static int str_ignore_error_cb(void *data, const char *input)
301 struct thread_data *td = data;
303 int type = 0, ret = 1;
308 p = str = strdup(input);
310 strip_blank_front(&str);
311 strip_blank_end(str);
317 ret = ignore_error_type(td, type, p);
327 static int str_rw_cb(void *data, const char *str)
329 struct thread_data *td = data;
330 struct thread_options *o = &td->o;
339 nr = get_opt_postfix(str);
344 o->ddir_seq_nr = atoi(nr);
348 if (str_to_decimal(nr, &val, 1, o, 0, 0)) {
349 log_err("fio: rw postfix parsing failed\n");
354 o->ddir_seq_add = val;
361 static int str_mem_cb(void *data, const char *mem)
363 struct thread_data *td = data;
365 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
366 td->o.mmapfile = get_opt_postfix(mem);
371 static int fio_clock_source_cb(void *data, const char *str)
373 struct thread_data *td = data;
375 fio_clock_source = td->o.clocksource;
376 fio_clock_source_set = 1;
381 static int str_rwmix_read_cb(void *data, unsigned long long *val)
383 struct thread_data *td = data;
385 td->o.rwmix[DDIR_READ] = *val;
386 td->o.rwmix[DDIR_WRITE] = 100 - *val;
390 static int str_rwmix_write_cb(void *data, unsigned long long *val)
392 struct thread_data *td = data;
394 td->o.rwmix[DDIR_WRITE] = *val;
395 td->o.rwmix[DDIR_READ] = 100 - *val;
399 static int str_exitall_cb(void)
401 exitall_on_terminate = 1;
405 #ifdef FIO_HAVE_CPU_AFFINITY
406 int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
408 unsigned int i, index, cpus_in_mask;
409 const long max_cpu = cpus_online();
411 cpus_in_mask = fio_cpu_count(mask);
412 cpu_index = cpu_index % cpus_in_mask;
415 for (i = 0; i < max_cpu; i++) {
416 if (!fio_cpu_isset(mask, i))
419 if (cpu_index != index)
420 fio_cpu_clear(mask, i);
425 return fio_cpu_count(mask);
428 static int str_cpumask_cb(void *data, unsigned long long *val)
430 struct thread_data *td = data;
438 ret = fio_cpuset_init(&td->o.cpumask);
440 log_err("fio: cpuset_init failed\n");
441 td_verror(td, ret, "fio_cpuset_init");
445 max_cpu = cpus_online();
447 for (i = 0; i < sizeof(int) * 8; i++) {
448 if ((1 << i) & *val) {
450 log_err("fio: CPU %d too large (max=%ld)\n", i,
454 dprint(FD_PARSE, "set cpu allowed %d\n", i);
455 fio_cpu_set(&td->o.cpumask, i);
462 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
469 ret = fio_cpuset_init(mask);
471 log_err("fio: cpuset_init failed\n");
472 td_verror(td, ret, "fio_cpuset_init");
476 p = str = strdup(input);
478 strip_blank_front(&str);
479 strip_blank_end(str);
481 max_cpu = cpus_online();
483 while ((cpu = strsep(&str, ",")) != NULL) {
492 while ((cpu2 = strsep(&str2, "-")) != NULL) {
502 while (icpu <= icpu2) {
503 if (icpu >= FIO_MAX_CPUS) {
504 log_err("fio: your OS only supports up to"
505 " %d CPUs\n", (int) FIO_MAX_CPUS);
509 if (icpu >= max_cpu) {
510 log_err("fio: CPU %d too large (max=%ld)\n",
516 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
517 fio_cpu_set(mask, icpu);
528 static int str_cpus_allowed_cb(void *data, const char *input)
530 struct thread_data *td = data;
535 return set_cpus_allowed(td, &td->o.cpumask, input);
538 static int str_verify_cpus_allowed_cb(void *data, const char *input)
540 struct thread_data *td = data;
542 return set_cpus_allowed(td, &td->o.verify_cpumask, input);
546 #ifdef CONFIG_LIBNUMA
547 static int str_numa_cpunodes_cb(void *data, char *input)
549 struct thread_data *td = data;
550 struct bitmask *verify_bitmask;
555 /* numa_parse_nodestring() parses a character string list
556 * of nodes into a bit mask. The bit mask is allocated by
557 * numa_allocate_nodemask(), so it should be freed by
558 * numa_free_nodemask().
560 verify_bitmask = numa_parse_nodestring(input);
561 if (verify_bitmask == NULL) {
562 log_err("fio: numa_parse_nodestring failed\n");
563 td_verror(td, 1, "str_numa_cpunodes_cb");
566 numa_free_nodemask(verify_bitmask);
568 td->o.numa_cpunodes = strdup(input);
572 static int str_numa_mpol_cb(void *data, char *input)
574 struct thread_data *td = data;
575 const char * const policy_types[] =
576 { "default", "prefer", "bind", "interleave", "local", NULL };
579 struct bitmask *verify_bitmask;
584 nodelist = strchr(input, ':');
586 /* NUL-terminate mode */
590 for (i = 0; i <= MPOL_LOCAL; i++) {
591 if (!strcmp(input, policy_types[i])) {
592 td->o.numa_mem_mode = i;
596 if (i > MPOL_LOCAL) {
597 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
601 switch (td->o.numa_mem_mode) {
604 * Insist on a nodelist of one node only
607 char *rest = nodelist;
608 while (isdigit(*rest))
611 log_err("fio: one node only for \'prefer\'\n");
615 log_err("fio: one node is needed for \'prefer\'\n");
619 case MPOL_INTERLEAVE:
621 * Default to online nodes with memory if no nodelist
624 nodelist = strdup("all");
629 * Don't allow a nodelist
632 log_err("fio: NO nodelist for \'local\'\n");
638 * Insist on a nodelist
641 log_err("fio: a nodelist is needed for \'bind\'\n");
648 /* numa_parse_nodestring() parses a character string list
649 * of nodes into a bit mask. The bit mask is allocated by
650 * numa_allocate_nodemask(), so it should be freed by
651 * numa_free_nodemask().
653 switch (td->o.numa_mem_mode) {
655 td->o.numa_mem_prefer_node = atoi(nodelist);
657 case MPOL_INTERLEAVE:
659 verify_bitmask = numa_parse_nodestring(nodelist);
660 if (verify_bitmask == NULL) {
661 log_err("fio: numa_parse_nodestring failed\n");
662 td_verror(td, 1, "str_numa_memnodes_cb");
665 td->o.numa_memnodes = strdup(nodelist);
666 numa_free_nodemask(verify_bitmask);
681 static int str_fst_cb(void *data, const char *str)
683 struct thread_data *td = data;
684 char *nr = get_opt_postfix(str);
686 td->file_service_nr = 1;
688 td->file_service_nr = atoi(nr);
695 #ifdef CONFIG_SYNC_FILE_RANGE
696 static int str_sfr_cb(void *data, const char *str)
698 struct thread_data *td = data;
699 char *nr = get_opt_postfix(str);
701 td->sync_file_range_nr = 1;
703 td->sync_file_range_nr = atoi(nr);
711 static int str_random_distribution_cb(void *data, const char *str)
713 struct thread_data *td = data;
720 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
722 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
723 val = FIO_DEF_PARETO;
724 else if (td->o.random_distribution == FIO_RAND_DIST_GAUSS)
729 nr = get_opt_postfix(str);
730 if (nr && !str_to_float(nr, &val, 0)) {
731 log_err("fio: random postfix parsing failed\n");
738 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
740 log_err("fio: zipf theta must different than 1.0\n");
743 td->o.zipf_theta.u.f = val;
744 } else if (td->o.random_distribution == FIO_RAND_DIST_PARETO) {
745 if (val <= 0.00 || val >= 1.00) {
746 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
749 td->o.pareto_h.u.f = val;
751 if (val <= 0.00 || val >= 100.0) {
752 log_err("fio: normal deviation out of range (0 < input < 100.0)\n");
755 td->o.gauss_dev.u.f = val;
762 * Return next name in the string. Files are separated with ':'. If the ':'
763 * is escaped with a '\', then that ':' is part of the filename and does not
764 * indicate a new file.
766 static char *get_next_name(char **ptr)
771 if (!str || !strlen(str))
777 * No colon, we are done
779 p = strchr(str, ':');
786 * We got a colon, but it's the first character. Skip and
794 if (*(p - 1) != '\\') {
800 memmove(p - 1, p, strlen(p) + 1);
808 static int get_max_name_idx(char *input)
810 unsigned int cur_idx;
813 p = str = strdup(input);
814 for (cur_idx = 0; ; cur_idx++)
815 if (get_next_name(&str) == NULL)
823 * Returns the directory at the index, indexes > entires will be
824 * assigned via modulo division of the index
826 int set_name_idx(char *target, size_t tlen, char *input, int index)
828 unsigned int cur_idx;
830 char *fname, *str, *p;
832 p = str = strdup(input);
834 index %= get_max_name_idx(input);
835 for (cur_idx = 0; cur_idx <= index; cur_idx++)
836 fname = get_next_name(&str);
838 if (client_sockaddr_str[0]) {
839 len = snprintf(target, tlen, "%s/%s.", fname,
840 client_sockaddr_str);
842 len = snprintf(target, tlen, "%s/", fname);
844 target[tlen - 1] = '\0';
850 static int str_filename_cb(void *data, const char *input)
852 struct thread_data *td = data;
853 char *fname, *str, *p;
855 p = str = strdup(input);
857 strip_blank_front(&str);
858 strip_blank_end(str);
860 if (!td->files_index)
863 while ((fname = get_next_name(&str)) != NULL) {
866 add_file(td, fname, 0, 1);
873 static int str_directory_cb(void *data, const char fio_unused *unused)
875 struct thread_data *td = data;
877 char *dirname, *str, *p;
883 p = str = strdup(td->o.directory);
884 while ((dirname = get_next_name(&str)) != NULL) {
885 if (lstat(dirname, &sb) < 0) {
888 log_err("fio: %s is not a directory\n", dirname);
889 td_verror(td, ret, "lstat");
892 if (!S_ISDIR(sb.st_mode)) {
893 log_err("fio: %s is not a directory\n", dirname);
904 static int str_opendir_cb(void *data, const char fio_unused *str)
906 struct thread_data *td = data;
911 if (!td->files_index)
914 return add_dir_files(td, td->o.opendir);
917 static int pattern_cb(char *pattern, unsigned int max_size,
918 const char *input, unsigned int *pattern_bytes)
921 int i = 0, j = 0, len, k, base = 10;
922 uint32_t pattern_length;
926 * Check if it's a string input
928 loc1 = strchr(input, '\"');
932 if (*loc1 == '\0' || *loc1 == '\"')
937 } while (i < max_size);
946 * No string, find out if it's decimal or hexidecimal
948 loc1 = strstr(input, "0x");
949 loc2 = strstr(input, "0X");
952 off = strtol(input, NULL, base);
953 if (off != LONG_MAX || errno != ERANGE) {
955 pattern[i] = off & 0xff;
964 j = loc1 - input + 2;
966 j = loc2 - input + 2;
969 if (len - j < max_size * 2) {
971 off = converthexchartoint(input[k--]);
973 off += (converthexchartoint(input[k--])
975 pattern[i++] = (char) off;
981 * Fill the pattern all the way to the end. This greatly reduces
982 * the number of memcpy's we have to do when verifying the IO.
986 while (i > 1 && i * 2 <= max_size) {
987 memcpy(&pattern[i], &pattern[0], i);
992 * Fill remainder, if the pattern multiple ends up not being
995 while (i > 1 && i < max_size) {
996 unsigned int b = min(pattern_length, max_size - i);
998 memcpy(&pattern[i], &pattern[0], b);
1004 * The code in verify_io_u_pattern assumes a single byte
1005 * pattern fills the whole verify pattern buffer.
1007 memset(pattern, pattern[0], max_size);
1014 static int str_buffer_pattern_cb(void *data, const char *input)
1016 struct thread_data *td = data;
1019 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
1020 &td->o.buffer_pattern_bytes);
1022 if (!ret && td->o.buffer_pattern_bytes) {
1023 if (!td->o.compress_percentage)
1024 td->o.refill_buffers = 0;
1025 td->o.scramble_buffers = 0;
1026 td->o.zero_buffers = 0;
1028 log_err("fio: failed parsing pattern `%s`\n", input);
1035 static int str_buffer_compress_cb(void *data, unsigned long long *il)
1037 struct thread_data *td = data;
1039 td->flags |= TD_F_COMPRESS;
1040 td->o.compress_percentage = *il;
1044 static int str_dedupe_cb(void *data, unsigned long long *il)
1046 struct thread_data *td = data;
1048 td->flags |= TD_F_COMPRESS;
1049 td->o.dedupe_percentage = *il;
1050 td->o.refill_buffers = 1;
1054 static int str_verify_pattern_cb(void *data, const char *input)
1056 struct thread_data *td = data;
1059 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
1060 &td->o.verify_pattern_bytes);
1063 * VERIFY_META could already be set
1065 if (!ret && td->o.verify == VERIFY_NONE)
1066 td->o.verify = VERIFY_PATTERN;
1071 static int str_gtod_reduce_cb(void *data, int *il)
1073 struct thread_data *td = data;
1076 td->o.disable_lat = !!val;
1077 td->o.disable_clat = !!val;
1078 td->o.disable_slat = !!val;
1079 td->o.disable_bw = !!val;
1080 td->o.clat_percentiles = !val;
1082 td->tv_cache_mask = 63;
1087 static int str_size_cb(void *data, unsigned long long *__val)
1089 struct thread_data *td = data;
1090 unsigned long long v = *__val;
1092 if (parse_is_percent(v)) {
1094 td->o.size_percent = -1ULL - v;
1101 static int rw_verify(struct fio_option *o, void *data)
1103 struct thread_data *td = data;
1105 if (read_only && td_write(td)) {
1106 log_err("fio: job <%s> has write bit set, but fio is in"
1107 " read-only mode\n", td->o.name);
1114 static int gtod_cpu_verify(struct fio_option *o, void *data)
1116 #ifndef FIO_HAVE_CPU_AFFINITY
1117 struct thread_data *td = data;
1119 if (td->o.gtod_cpu) {
1120 log_err("fio: platform must support CPU affinity for"
1121 "gettimeofday() offloading\n");
1132 static struct opt_group fio_opt_groups[] = {
1135 .mask = FIO_OPT_C_GENERAL,
1139 .mask = FIO_OPT_C_IO,
1143 .mask = FIO_OPT_C_FILE,
1146 .name = "Statistics",
1147 .mask = FIO_OPT_C_STAT,
1151 .mask = FIO_OPT_C_LOG,
1155 .mask = FIO_OPT_C_PROFILE,
1162 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1163 unsigned int inv_mask)
1165 struct opt_group *og;
1168 if (*mask == inv_mask || !*mask)
1171 for (i = 0; ogs[i].name; i++) {
1174 if (*mask & og->mask) {
1175 *mask &= ~(og->mask);
1183 struct opt_group *opt_group_from_mask(unsigned int *mask)
1185 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1188 static struct opt_group fio_opt_cat_groups[] = {
1190 .name = "Latency profiling",
1191 .mask = FIO_OPT_G_LATPROF,
1195 .mask = FIO_OPT_G_RATE,
1199 .mask = FIO_OPT_G_ZONE,
1202 .name = "Read/write mix",
1203 .mask = FIO_OPT_G_RWMIX,
1207 .mask = FIO_OPT_G_VERIFY,
1211 .mask = FIO_OPT_G_TRIM,
1214 .name = "I/O Logging",
1215 .mask = FIO_OPT_G_IOLOG,
1218 .name = "I/O Depth",
1219 .mask = FIO_OPT_G_IO_DEPTH,
1223 .mask = FIO_OPT_G_IO_FLOW,
1226 .name = "Description",
1227 .mask = FIO_OPT_G_DESC,
1231 .mask = FIO_OPT_G_FILENAME,
1234 .name = "General I/O",
1235 .mask = FIO_OPT_G_IO_BASIC,
1239 .mask = FIO_OPT_G_CGROUP,
1243 .mask = FIO_OPT_G_RUNTIME,
1247 .mask = FIO_OPT_G_PROCESS,
1250 .name = "Job credentials / priority",
1251 .mask = FIO_OPT_G_CRED,
1254 .name = "Clock settings",
1255 .mask = FIO_OPT_G_CLOCK,
1259 .mask = FIO_OPT_G_IO_TYPE,
1262 .name = "I/O Thinktime",
1263 .mask = FIO_OPT_G_THINKTIME,
1266 .name = "Randomizations",
1267 .mask = FIO_OPT_G_RANDOM,
1270 .name = "I/O buffers",
1271 .mask = FIO_OPT_G_IO_BUF,
1274 .name = "Tiobench profile",
1275 .mask = FIO_OPT_G_TIOBENCH,
1279 .mask = FIO_OPT_G_MTD,
1287 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1289 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1293 * Map of job/command line options
1295 struct fio_option fio_options[FIO_MAX_OPTS] = {
1297 .name = "description",
1298 .lname = "Description of job",
1299 .type = FIO_OPT_STR_STORE,
1300 .off1 = td_var_offset(description),
1301 .help = "Text job description",
1302 .category = FIO_OPT_C_GENERAL,
1303 .group = FIO_OPT_G_DESC,
1307 .lname = "Job name",
1308 .type = FIO_OPT_STR_STORE,
1309 .off1 = td_var_offset(name),
1310 .help = "Name of this job",
1311 .category = FIO_OPT_C_GENERAL,
1312 .group = FIO_OPT_G_DESC,
1316 .lname = "Filename(s)",
1317 .type = FIO_OPT_STR_STORE,
1318 .off1 = td_var_offset(filename),
1319 .cb = str_filename_cb,
1320 .prio = -1, /* must come after "directory" */
1321 .help = "File(s) to use for the workload",
1322 .category = FIO_OPT_C_FILE,
1323 .group = FIO_OPT_G_FILENAME,
1326 .name = "directory",
1327 .lname = "Directory",
1328 .type = FIO_OPT_STR_STORE,
1329 .off1 = td_var_offset(directory),
1330 .cb = str_directory_cb,
1331 .help = "Directory to store files in",
1332 .category = FIO_OPT_C_FILE,
1333 .group = FIO_OPT_G_FILENAME,
1336 .name = "filename_format",
1337 .type = FIO_OPT_STR_STORE,
1338 .off1 = td_var_offset(filename_format),
1339 .prio = -1, /* must come after "directory" */
1340 .help = "Override default $jobname.$jobnum.$filenum naming",
1341 .def = "$jobname.$jobnum.$filenum",
1342 .category = FIO_OPT_C_FILE,
1343 .group = FIO_OPT_G_FILENAME,
1347 .lname = "Lockfile",
1348 .type = FIO_OPT_STR,
1349 .off1 = td_var_offset(file_lock_mode),
1350 .help = "Lock file when doing IO to it",
1352 .parent = "filename",
1355 .category = FIO_OPT_C_FILE,
1356 .group = FIO_OPT_G_FILENAME,
1359 .oval = FILE_LOCK_NONE,
1360 .help = "No file locking",
1362 { .ival = "exclusive",
1363 .oval = FILE_LOCK_EXCLUSIVE,
1364 .help = "Exclusive file lock",
1367 .ival = "readwrite",
1368 .oval = FILE_LOCK_READWRITE,
1369 .help = "Read vs write lock",
1375 .lname = "Open directory",
1376 .type = FIO_OPT_STR_STORE,
1377 .off1 = td_var_offset(opendir),
1378 .cb = str_opendir_cb,
1379 .help = "Recursively add files from this directory and down",
1380 .category = FIO_OPT_C_FILE,
1381 .group = FIO_OPT_G_FILENAME,
1385 .lname = "Read/write",
1386 .alias = "readwrite",
1387 .type = FIO_OPT_STR,
1389 .off1 = td_var_offset(td_ddir),
1390 .help = "IO direction",
1392 .verify = rw_verify,
1393 .category = FIO_OPT_C_IO,
1394 .group = FIO_OPT_G_IO_BASIC,
1397 .oval = TD_DDIR_READ,
1398 .help = "Sequential read",
1401 .oval = TD_DDIR_WRITE,
1402 .help = "Sequential write",
1405 .oval = TD_DDIR_TRIM,
1406 .help = "Sequential trim",
1408 { .ival = "randread",
1409 .oval = TD_DDIR_RANDREAD,
1410 .help = "Random read",
1412 { .ival = "randwrite",
1413 .oval = TD_DDIR_RANDWRITE,
1414 .help = "Random write",
1416 { .ival = "randtrim",
1417 .oval = TD_DDIR_RANDTRIM,
1418 .help = "Random trim",
1422 .help = "Sequential read and write mix",
1424 { .ival = "readwrite",
1426 .help = "Sequential read and write mix",
1429 .oval = TD_DDIR_RANDRW,
1430 .help = "Random read and write mix"
1432 { .ival = "trimwrite",
1433 .oval = TD_DDIR_TRIMWRITE,
1434 .help = "Trim and write mix, trims preceding writes"
1439 .name = "rw_sequencer",
1440 .lname = "RW Sequencer",
1441 .type = FIO_OPT_STR,
1442 .off1 = td_var_offset(rw_seq),
1443 .help = "IO offset generator modifier",
1444 .def = "sequential",
1445 .category = FIO_OPT_C_IO,
1446 .group = FIO_OPT_G_IO_BASIC,
1448 { .ival = "sequential",
1450 .help = "Generate sequential offsets",
1452 { .ival = "identical",
1453 .oval = RW_SEQ_IDENT,
1454 .help = "Generate identical offsets",
1461 .lname = "IO Engine",
1462 .type = FIO_OPT_STR_STORE,
1463 .off1 = td_var_offset(ioengine),
1464 .help = "IO engine to use",
1465 .def = FIO_PREFERRED_ENGINE,
1466 .category = FIO_OPT_C_IO,
1467 .group = FIO_OPT_G_IO_BASIC,
1470 .help = "Use read/write",
1473 .help = "Use pread/pwrite",
1476 .help = "Use readv/writev",
1478 #ifdef CONFIG_PWRITEV
1480 .help = "Use preadv/pwritev",
1483 #ifdef CONFIG_LIBAIO
1485 .help = "Linux native asynchronous IO",
1488 #ifdef CONFIG_POSIXAIO
1489 { .ival = "posixaio",
1490 .help = "POSIX asynchronous IO",
1493 #ifdef CONFIG_SOLARISAIO
1494 { .ival = "solarisaio",
1495 .help = "Solaris native asynchronous IO",
1498 #ifdef CONFIG_WINDOWSAIO
1499 { .ival = "windowsaio",
1500 .help = "Windows native asynchronous IO"
1505 .help = "Rados Block Device asynchronous IO"
1509 .help = "Memory mapped IO"
1511 #ifdef CONFIG_LINUX_SPLICE
1513 .help = "splice/vmsplice based IO",
1515 { .ival = "netsplice",
1516 .help = "splice/vmsplice to/from the network",
1519 #ifdef FIO_HAVE_SGIO
1521 .help = "SCSI generic v3 IO",
1525 .help = "Testing engine (no data transfer)",
1528 .help = "Network IO",
1531 .help = "CPU cycle burner engine",
1535 .help = "GUASI IO engine",
1538 #ifdef FIO_HAVE_BINJECT
1539 { .ival = "binject",
1540 .help = "binject direct inject block engine",
1545 .help = "RDMA IO engine",
1548 #ifdef CONFIG_FUSION_AW
1549 { .ival = "fusion-aw-sync",
1550 .help = "Fusion-io atomic write engine",
1553 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1554 { .ival = "e4defrag",
1555 .help = "ext4 defrag engine",
1558 #ifdef CONFIG_LINUX_FALLOCATE
1560 .help = "fallocate() file based engine",
1565 .help = "Glusterfs libgfapi(sync) based engine"
1567 { .ival = "gfapi_async",
1568 .help = "Glusterfs libgfapi(async) based engine"
1571 #ifdef CONFIG_LIBHDFS
1572 { .ival = "libhdfs",
1573 .help = "Hadoop Distributed Filesystem (HDFS) engine"
1576 { .ival = "external",
1577 .help = "Load external engine (append name)",
1583 .lname = "IO Depth",
1584 .type = FIO_OPT_INT,
1585 .off1 = td_var_offset(iodepth),
1586 .help = "Number of IO buffers to keep in flight",
1590 .category = FIO_OPT_C_IO,
1591 .group = FIO_OPT_G_IO_BASIC,
1594 .name = "iodepth_batch",
1595 .lname = "IO Depth batch",
1596 .alias = "iodepth_batch_submit",
1597 .type = FIO_OPT_INT,
1598 .off1 = td_var_offset(iodepth_batch),
1599 .help = "Number of IO buffers to submit in one go",
1600 .parent = "iodepth",
1605 .category = FIO_OPT_C_IO,
1606 .group = FIO_OPT_G_IO_BASIC,
1609 .name = "iodepth_batch_complete",
1610 .lname = "IO Depth batch complete",
1611 .type = FIO_OPT_INT,
1612 .off1 = td_var_offset(iodepth_batch_complete),
1613 .help = "Number of IO buffers to retrieve in one go",
1614 .parent = "iodepth",
1619 .category = FIO_OPT_C_IO,
1620 .group = FIO_OPT_G_IO_BASIC,
1623 .name = "iodepth_low",
1624 .lname = "IO Depth batch low",
1625 .type = FIO_OPT_INT,
1626 .off1 = td_var_offset(iodepth_low),
1627 .help = "Low water mark for queuing depth",
1628 .parent = "iodepth",
1631 .category = FIO_OPT_C_IO,
1632 .group = FIO_OPT_G_IO_BASIC,
1635 .name = "io_submit_mode",
1636 .lname = "IO submit mode",
1637 .type = FIO_OPT_STR,
1638 .off1 = td_var_offset(io_submit_mode),
1639 .help = "How IO submissions and completions are done",
1641 .category = FIO_OPT_C_IO,
1642 .group = FIO_OPT_G_IO_BASIC,
1645 .oval = IO_MODE_INLINE,
1646 .help = "Submit and complete IO inline",
1648 { .ival = "offload",
1649 .oval = IO_MODE_OFFLOAD,
1650 .help = "Offload submit and complete to threads",
1657 .type = FIO_OPT_STR_VAL,
1659 .off1 = td_var_offset(size),
1660 .help = "Total size of device or files",
1661 .interval = 1024 * 1024,
1662 .category = FIO_OPT_C_IO,
1663 .group = FIO_OPT_G_INVALID,
1667 .alias = "io_limit",
1669 .type = FIO_OPT_STR_VAL,
1670 .off1 = td_var_offset(io_limit),
1671 .interval = 1024 * 1024,
1672 .category = FIO_OPT_C_IO,
1673 .group = FIO_OPT_G_INVALID,
1676 .name = "fill_device",
1677 .lname = "Fill device",
1679 .type = FIO_OPT_BOOL,
1680 .off1 = td_var_offset(fill_device),
1681 .help = "Write until an ENOSPC error occurs",
1683 .category = FIO_OPT_C_FILE,
1684 .group = FIO_OPT_G_INVALID,
1688 .lname = "File size",
1689 .type = FIO_OPT_STR_VAL,
1690 .off1 = td_var_offset(file_size_low),
1691 .off2 = td_var_offset(file_size_high),
1693 .help = "Size of individual files",
1694 .interval = 1024 * 1024,
1695 .category = FIO_OPT_C_FILE,
1696 .group = FIO_OPT_G_INVALID,
1699 .name = "file_append",
1700 .lname = "File append",
1701 .type = FIO_OPT_BOOL,
1702 .off1 = td_var_offset(file_append),
1703 .help = "IO will start at the end of the file(s)",
1705 .category = FIO_OPT_C_FILE,
1706 .group = FIO_OPT_G_INVALID,
1710 .lname = "IO offset",
1711 .alias = "fileoffset",
1712 .type = FIO_OPT_STR_VAL,
1713 .off1 = td_var_offset(start_offset),
1714 .help = "Start IO from this offset",
1716 .interval = 1024 * 1024,
1717 .category = FIO_OPT_C_IO,
1718 .group = FIO_OPT_G_INVALID,
1721 .name = "offset_increment",
1722 .lname = "IO offset increment",
1723 .type = FIO_OPT_STR_VAL,
1724 .off1 = td_var_offset(offset_increment),
1725 .help = "What is the increment from one offset to the next",
1729 .interval = 1024 * 1024,
1730 .category = FIO_OPT_C_IO,
1731 .group = FIO_OPT_G_INVALID,
1734 .name = "number_ios",
1735 .lname = "Number of IOs to perform",
1736 .type = FIO_OPT_STR_VAL,
1737 .off1 = td_var_offset(number_ios),
1738 .help = "Force job completion after this number of IOs",
1740 .category = FIO_OPT_C_IO,
1741 .group = FIO_OPT_G_INVALID,
1745 .lname = "Block size",
1746 .alias = "blocksize",
1747 .type = FIO_OPT_INT,
1748 .off1 = td_var_offset(bs[DDIR_READ]),
1749 .off2 = td_var_offset(bs[DDIR_WRITE]),
1750 .off3 = td_var_offset(bs[DDIR_TRIM]),
1752 .help = "Block size unit",
1757 .category = FIO_OPT_C_IO,
1758 .group = FIO_OPT_G_INVALID,
1762 .lname = "Block size align",
1763 .alias = "blockalign",
1764 .type = FIO_OPT_INT,
1765 .off1 = td_var_offset(ba[DDIR_READ]),
1766 .off2 = td_var_offset(ba[DDIR_WRITE]),
1767 .off3 = td_var_offset(ba[DDIR_TRIM]),
1769 .help = "IO block offset alignment",
1773 .category = FIO_OPT_C_IO,
1774 .group = FIO_OPT_G_INVALID,
1778 .lname = "Block size range",
1779 .alias = "blocksize_range",
1780 .type = FIO_OPT_RANGE,
1781 .off1 = td_var_offset(min_bs[DDIR_READ]),
1782 .off2 = td_var_offset(max_bs[DDIR_READ]),
1783 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1784 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1785 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1786 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1788 .help = "Set block size range (in more detail than bs)",
1792 .category = FIO_OPT_C_IO,
1793 .group = FIO_OPT_G_INVALID,
1797 .lname = "Block size split",
1798 .type = FIO_OPT_STR,
1799 .cb = str_bssplit_cb,
1800 .off1 = td_var_offset(bssplit),
1801 .help = "Set a specific mix of block sizes",
1804 .category = FIO_OPT_C_IO,
1805 .group = FIO_OPT_G_INVALID,
1808 .name = "bs_unaligned",
1809 .lname = "Block size unaligned",
1810 .alias = "blocksize_unaligned",
1811 .type = FIO_OPT_STR_SET,
1812 .off1 = td_var_offset(bs_unaligned),
1813 .help = "Don't sector align IO buffer sizes",
1816 .category = FIO_OPT_C_IO,
1817 .group = FIO_OPT_G_INVALID,
1820 .name = "bs_is_seq_rand",
1821 .lname = "Block size division is seq/random (not read/write)",
1822 .type = FIO_OPT_BOOL,
1823 .off1 = td_var_offset(bs_is_seq_rand),
1824 .help = "Consider any blocksize setting to be sequential,random",
1826 .parent = "blocksize",
1827 .category = FIO_OPT_C_IO,
1828 .group = FIO_OPT_G_INVALID,
1831 .name = "randrepeat",
1832 .lname = "Random repeatable",
1833 .type = FIO_OPT_BOOL,
1834 .off1 = td_var_offset(rand_repeatable),
1835 .help = "Use repeatable random IO pattern",
1839 .category = FIO_OPT_C_IO,
1840 .group = FIO_OPT_G_RANDOM,
1844 .lname = "The random generator seed",
1845 .type = FIO_OPT_STR_VAL,
1846 .off1 = td_var_offset(rand_seed),
1847 .help = "Set the random generator seed value",
1850 .category = FIO_OPT_C_IO,
1851 .group = FIO_OPT_G_RANDOM,
1854 .name = "use_os_rand",
1855 .lname = "Use OS random",
1856 .type = FIO_OPT_DEPRECATED,
1857 .off1 = td_var_offset(dep_use_os_rand),
1858 .category = FIO_OPT_C_IO,
1859 .group = FIO_OPT_G_RANDOM,
1862 .name = "norandommap",
1863 .lname = "No randommap",
1864 .type = FIO_OPT_STR_SET,
1865 .off1 = td_var_offset(norandommap),
1866 .help = "Accept potential duplicate random blocks",
1870 .category = FIO_OPT_C_IO,
1871 .group = FIO_OPT_G_RANDOM,
1874 .name = "softrandommap",
1875 .lname = "Soft randommap",
1876 .type = FIO_OPT_BOOL,
1877 .off1 = td_var_offset(softrandommap),
1878 .help = "Set norandommap if randommap allocation fails",
1879 .parent = "norandommap",
1882 .category = FIO_OPT_C_IO,
1883 .group = FIO_OPT_G_RANDOM,
1886 .name = "random_generator",
1887 .type = FIO_OPT_STR,
1888 .off1 = td_var_offset(random_generator),
1889 .help = "Type of random number generator to use",
1890 .def = "tausworthe",
1892 { .ival = "tausworthe",
1893 .oval = FIO_RAND_GEN_TAUSWORTHE,
1894 .help = "Strong Tausworthe generator",
1897 .oval = FIO_RAND_GEN_LFSR,
1898 .help = "Variable length LFSR",
1901 .category = FIO_OPT_C_IO,
1902 .group = FIO_OPT_G_RANDOM,
1905 .name = "random_distribution",
1906 .type = FIO_OPT_STR,
1907 .off1 = td_var_offset(random_distribution),
1908 .cb = str_random_distribution_cb,
1909 .help = "Random offset distribution generator",
1913 .oval = FIO_RAND_DIST_RANDOM,
1914 .help = "Completely random",
1917 .oval = FIO_RAND_DIST_ZIPF,
1918 .help = "Zipf distribution",
1921 .oval = FIO_RAND_DIST_PARETO,
1922 .help = "Pareto distribution",
1925 .oval = FIO_RAND_DIST_GAUSS,
1926 .help = "Normal (gaussian) distribution",
1929 .category = FIO_OPT_C_IO,
1930 .group = FIO_OPT_G_RANDOM,
1933 .name = "percentage_random",
1934 .lname = "Percentage Random",
1935 .type = FIO_OPT_INT,
1936 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1937 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1938 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1940 .help = "Percentage of seq/random mix that should be random",
1941 .def = "100,100,100",
1943 .inverse = "percentage_sequential",
1944 .category = FIO_OPT_C_IO,
1945 .group = FIO_OPT_G_RANDOM,
1948 .name = "percentage_sequential",
1949 .lname = "Percentage Sequential",
1950 .type = FIO_OPT_DEPRECATED,
1951 .category = FIO_OPT_C_IO,
1952 .group = FIO_OPT_G_RANDOM,
1955 .name = "allrandrepeat",
1956 .type = FIO_OPT_BOOL,
1957 .off1 = td_var_offset(allrand_repeatable),
1958 .help = "Use repeatable random numbers for everything",
1960 .category = FIO_OPT_C_IO,
1961 .group = FIO_OPT_G_RANDOM,
1965 .lname = "Number of files",
1966 .alias = "nr_files",
1967 .type = FIO_OPT_INT,
1968 .off1 = td_var_offset(nr_files),
1969 .help = "Split job workload between this number of files",
1972 .category = FIO_OPT_C_FILE,
1973 .group = FIO_OPT_G_INVALID,
1976 .name = "openfiles",
1977 .lname = "Number of open files",
1978 .type = FIO_OPT_INT,
1979 .off1 = td_var_offset(open_files),
1980 .help = "Number of files to keep open at the same time",
1981 .category = FIO_OPT_C_FILE,
1982 .group = FIO_OPT_G_INVALID,
1985 .name = "file_service_type",
1986 .lname = "File service type",
1987 .type = FIO_OPT_STR,
1989 .off1 = td_var_offset(file_service_type),
1990 .help = "How to select which file to service next",
1991 .def = "roundrobin",
1992 .category = FIO_OPT_C_FILE,
1993 .group = FIO_OPT_G_INVALID,
1996 .oval = FIO_FSERVICE_RANDOM,
1997 .help = "Choose a file at random",
1999 { .ival = "roundrobin",
2000 .oval = FIO_FSERVICE_RR,
2001 .help = "Round robin select files",
2003 { .ival = "sequential",
2004 .oval = FIO_FSERVICE_SEQ,
2005 .help = "Finish one file before moving to the next",
2008 .parent = "nrfiles",
2011 #ifdef CONFIG_POSIX_FALLOCATE
2013 .name = "fallocate",
2014 .lname = "Fallocate",
2015 .type = FIO_OPT_STR,
2016 .off1 = td_var_offset(fallocate_mode),
2017 .help = "Whether pre-allocation is performed when laying out files",
2019 .category = FIO_OPT_C_FILE,
2020 .group = FIO_OPT_G_INVALID,
2023 .oval = FIO_FALLOCATE_NONE,
2024 .help = "Do not pre-allocate space",
2027 .oval = FIO_FALLOCATE_POSIX,
2028 .help = "Use posix_fallocate()",
2030 #ifdef CONFIG_LINUX_FALLOCATE
2032 .oval = FIO_FALLOCATE_KEEP_SIZE,
2033 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
2036 /* Compatibility with former boolean values */
2038 .oval = FIO_FALLOCATE_NONE,
2039 .help = "Alias for 'none'",
2042 .oval = FIO_FALLOCATE_POSIX,
2043 .help = "Alias for 'posix'",
2047 #endif /* CONFIG_POSIX_FALLOCATE */
2049 .name = "fadvise_hint",
2050 .lname = "Fadvise hint",
2051 .type = FIO_OPT_BOOL,
2052 .off1 = td_var_offset(fadvise_hint),
2053 .help = "Use fadvise() to advise the kernel on IO pattern",
2055 .category = FIO_OPT_C_FILE,
2056 .group = FIO_OPT_G_INVALID,
2058 #ifdef FIO_HAVE_STREAMID
2060 .name = "fadvise_stream",
2061 .lname = "Fadvise stream",
2062 .type = FIO_OPT_INT,
2063 .off1 = td_var_offset(fadvise_stream),
2064 .help = "Use fadvise() to set stream ID",
2065 .category = FIO_OPT_C_FILE,
2066 .group = FIO_OPT_G_INVALID,
2072 .type = FIO_OPT_INT,
2073 .off1 = td_var_offset(fsync_blocks),
2074 .help = "Issue fsync for writes every given number of blocks",
2077 .category = FIO_OPT_C_FILE,
2078 .group = FIO_OPT_G_INVALID,
2081 .name = "fdatasync",
2082 .lname = "Fdatasync",
2083 .type = FIO_OPT_INT,
2084 .off1 = td_var_offset(fdatasync_blocks),
2085 .help = "Issue fdatasync for writes every given number of blocks",
2088 .category = FIO_OPT_C_FILE,
2089 .group = FIO_OPT_G_INVALID,
2092 .name = "write_barrier",
2093 .lname = "Write barrier",
2094 .type = FIO_OPT_INT,
2095 .off1 = td_var_offset(barrier_blocks),
2096 .help = "Make every Nth write a barrier write",
2099 .category = FIO_OPT_C_IO,
2100 .group = FIO_OPT_G_INVALID,
2102 #ifdef CONFIG_SYNC_FILE_RANGE
2104 .name = "sync_file_range",
2105 .lname = "Sync file range",
2107 { .ival = "wait_before",
2108 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
2109 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
2113 .oval = SYNC_FILE_RANGE_WRITE,
2114 .help = "SYNC_FILE_RANGE_WRITE",
2118 .ival = "wait_after",
2119 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
2120 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
2124 .type = FIO_OPT_STR_MULTI,
2126 .off1 = td_var_offset(sync_file_range),
2127 .help = "Use sync_file_range()",
2128 .category = FIO_OPT_C_FILE,
2129 .group = FIO_OPT_G_INVALID,
2134 .lname = "Direct I/O",
2135 .type = FIO_OPT_BOOL,
2136 .off1 = td_var_offset(odirect),
2137 .help = "Use O_DIRECT IO (negates buffered)",
2139 .inverse = "buffered",
2140 .category = FIO_OPT_C_IO,
2141 .group = FIO_OPT_G_IO_TYPE,
2145 .lname = "Atomic I/O",
2146 .type = FIO_OPT_BOOL,
2147 .off1 = td_var_offset(oatomic),
2148 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
2150 .category = FIO_OPT_C_IO,
2151 .group = FIO_OPT_G_IO_TYPE,
2155 .lname = "Buffered I/O",
2156 .type = FIO_OPT_BOOL,
2157 .off1 = td_var_offset(odirect),
2159 .help = "Use buffered IO (negates direct)",
2161 .inverse = "direct",
2162 .category = FIO_OPT_C_IO,
2163 .group = FIO_OPT_G_IO_TYPE,
2166 .name = "overwrite",
2167 .lname = "Overwrite",
2168 .type = FIO_OPT_BOOL,
2169 .off1 = td_var_offset(overwrite),
2170 .help = "When writing, set whether to overwrite current data",
2172 .category = FIO_OPT_C_FILE,
2173 .group = FIO_OPT_G_INVALID,
2178 .type = FIO_OPT_INT,
2179 .off1 = td_var_offset(loops),
2180 .help = "Number of times to run the job",
2183 .category = FIO_OPT_C_GENERAL,
2184 .group = FIO_OPT_G_RUNTIME,
2188 .lname = "Number of jobs",
2189 .type = FIO_OPT_INT,
2190 .off1 = td_var_offset(numjobs),
2191 .help = "Duplicate this job this many times",
2194 .category = FIO_OPT_C_GENERAL,
2195 .group = FIO_OPT_G_RUNTIME,
2198 .name = "startdelay",
2199 .lname = "Start delay",
2200 .type = FIO_OPT_STR_VAL_TIME,
2201 .off1 = td_var_offset(start_delay),
2202 .off2 = td_var_offset(start_delay_high),
2203 .help = "Only start job when this period has passed",
2207 .category = FIO_OPT_C_GENERAL,
2208 .group = FIO_OPT_G_RUNTIME,
2214 .type = FIO_OPT_STR_VAL_TIME,
2215 .off1 = td_var_offset(timeout),
2216 .help = "Stop workload when this amount of time has passed",
2220 .category = FIO_OPT_C_GENERAL,
2221 .group = FIO_OPT_G_RUNTIME,
2224 .name = "time_based",
2225 .lname = "Time based",
2226 .type = FIO_OPT_STR_SET,
2227 .off1 = td_var_offset(time_based),
2228 .help = "Keep running until runtime/timeout is met",
2229 .category = FIO_OPT_C_GENERAL,
2230 .group = FIO_OPT_G_RUNTIME,
2233 .name = "verify_only",
2234 .lname = "Verify only",
2235 .type = FIO_OPT_STR_SET,
2236 .off1 = td_var_offset(verify_only),
2237 .help = "Verifies previously written data is still valid",
2238 .category = FIO_OPT_C_GENERAL,
2239 .group = FIO_OPT_G_RUNTIME,
2242 .name = "ramp_time",
2243 .lname = "Ramp time",
2244 .type = FIO_OPT_STR_VAL_TIME,
2245 .off1 = td_var_offset(ramp_time),
2246 .help = "Ramp up time before measuring performance",
2249 .category = FIO_OPT_C_GENERAL,
2250 .group = FIO_OPT_G_RUNTIME,
2253 .name = "clocksource",
2254 .lname = "Clock source",
2255 .type = FIO_OPT_STR,
2256 .cb = fio_clock_source_cb,
2257 .off1 = td_var_offset(clocksource),
2258 .help = "What type of timing source to use",
2259 .category = FIO_OPT_C_GENERAL,
2260 .group = FIO_OPT_G_CLOCK,
2262 #ifdef CONFIG_GETTIMEOFDAY
2263 { .ival = "gettimeofday",
2265 .help = "Use gettimeofday(2) for timing",
2268 #ifdef CONFIG_CLOCK_GETTIME
2269 { .ival = "clock_gettime",
2270 .oval = CS_CGETTIME,
2271 .help = "Use clock_gettime(2) for timing",
2274 #ifdef ARCH_HAVE_CPU_CLOCK
2276 .oval = CS_CPUCLOCK,
2277 .help = "Use CPU private clock",
2285 .lname = "I/O Memory",
2286 .type = FIO_OPT_STR,
2288 .off1 = td_var_offset(mem_type),
2289 .help = "Backing type for IO buffers",
2291 .category = FIO_OPT_C_IO,
2292 .group = FIO_OPT_G_INVALID,
2296 .help = "Use malloc(3) for IO buffers",
2298 #ifndef CONFIG_NO_SHM
2301 .help = "Use shared memory segments for IO buffers",
2303 #ifdef FIO_HAVE_HUGETLB
2304 { .ival = "shmhuge",
2305 .oval = MEM_SHMHUGE,
2306 .help = "Like shm, but use huge pages",
2312 .help = "Use mmap(2) (file or anon) for IO buffers",
2314 #ifdef FIO_HAVE_HUGETLB
2315 { .ival = "mmaphuge",
2316 .oval = MEM_MMAPHUGE,
2317 .help = "Like mmap, but use huge pages",
2323 .name = "iomem_align",
2324 .alias = "mem_align",
2325 .lname = "I/O memory alignment",
2326 .type = FIO_OPT_INT,
2327 .off1 = td_var_offset(mem_align),
2329 .help = "IO memory buffer offset alignment",
2333 .category = FIO_OPT_C_IO,
2334 .group = FIO_OPT_G_INVALID,
2339 .type = FIO_OPT_STR,
2340 .off1 = td_var_offset(verify),
2341 .help = "Verify data written",
2343 .category = FIO_OPT_C_IO,
2344 .group = FIO_OPT_G_VERIFY,
2347 .oval = VERIFY_NONE,
2348 .help = "Don't do IO verification",
2352 .help = "Use md5 checksums for verification",
2355 .oval = VERIFY_CRC64,
2356 .help = "Use crc64 checksums for verification",
2359 .oval = VERIFY_CRC32,
2360 .help = "Use crc32 checksums for verification",
2362 { .ival = "crc32c-intel",
2363 .oval = VERIFY_CRC32C,
2364 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2367 .oval = VERIFY_CRC32C,
2368 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2371 .oval = VERIFY_CRC16,
2372 .help = "Use crc16 checksums for verification",
2375 .oval = VERIFY_CRC7,
2376 .help = "Use crc7 checksums for verification",
2379 .oval = VERIFY_SHA1,
2380 .help = "Use sha1 checksums for verification",
2383 .oval = VERIFY_SHA256,
2384 .help = "Use sha256 checksums for verification",
2387 .oval = VERIFY_SHA512,
2388 .help = "Use sha512 checksums for verification",
2391 .oval = VERIFY_XXHASH,
2392 .help = "Use xxhash checksums for verification",
2395 .oval = VERIFY_META,
2396 .help = "Use io information",
2400 .oval = VERIFY_NULL,
2401 .help = "Pretend to verify",
2406 .name = "do_verify",
2407 .lname = "Perform verify step",
2408 .type = FIO_OPT_BOOL,
2409 .off1 = td_var_offset(do_verify),
2410 .help = "Run verification stage after write",
2414 .category = FIO_OPT_C_IO,
2415 .group = FIO_OPT_G_VERIFY,
2418 .name = "verifysort",
2419 .lname = "Verify sort",
2420 .type = FIO_OPT_BOOL,
2421 .off1 = td_var_offset(verifysort),
2422 .help = "Sort written verify blocks for read back",
2426 .category = FIO_OPT_C_IO,
2427 .group = FIO_OPT_G_VERIFY,
2430 .name = "verifysort_nr",
2431 .type = FIO_OPT_INT,
2432 .off1 = td_var_offset(verifysort_nr),
2433 .help = "Pre-load and sort verify blocks for a read workload",
2438 .category = FIO_OPT_C_IO,
2439 .group = FIO_OPT_G_VERIFY,
2442 .name = "verify_interval",
2443 .lname = "Verify interval",
2444 .type = FIO_OPT_INT,
2445 .off1 = td_var_offset(verify_interval),
2446 .minval = 2 * sizeof(struct verify_header),
2447 .help = "Store verify buffer header every N bytes",
2450 .interval = 2 * sizeof(struct verify_header),
2451 .category = FIO_OPT_C_IO,
2452 .group = FIO_OPT_G_VERIFY,
2455 .name = "verify_offset",
2456 .lname = "Verify offset",
2457 .type = FIO_OPT_INT,
2458 .help = "Offset verify header location by N bytes",
2459 .off1 = td_var_offset(verify_offset),
2460 .minval = sizeof(struct verify_header),
2463 .category = FIO_OPT_C_IO,
2464 .group = FIO_OPT_G_VERIFY,
2467 .name = "verify_pattern",
2468 .lname = "Verify pattern",
2469 .type = FIO_OPT_STR,
2470 .cb = str_verify_pattern_cb,
2471 .off1 = td_var_offset(verify_pattern),
2472 .help = "Fill pattern for IO buffers",
2475 .category = FIO_OPT_C_IO,
2476 .group = FIO_OPT_G_VERIFY,
2479 .name = "verify_fatal",
2480 .lname = "Verify fatal",
2481 .type = FIO_OPT_BOOL,
2482 .off1 = td_var_offset(verify_fatal),
2484 .help = "Exit on a single verify failure, don't continue",
2487 .category = FIO_OPT_C_IO,
2488 .group = FIO_OPT_G_VERIFY,
2491 .name = "verify_dump",
2492 .lname = "Verify dump",
2493 .type = FIO_OPT_BOOL,
2494 .off1 = td_var_offset(verify_dump),
2496 .help = "Dump contents of good and bad blocks on failure",
2499 .category = FIO_OPT_C_IO,
2500 .group = FIO_OPT_G_VERIFY,
2503 .name = "verify_async",
2504 .lname = "Verify asynchronously",
2505 .type = FIO_OPT_INT,
2506 .off1 = td_var_offset(verify_async),
2508 .help = "Number of async verifier threads to use",
2511 .category = FIO_OPT_C_IO,
2512 .group = FIO_OPT_G_VERIFY,
2515 .name = "verify_backlog",
2516 .lname = "Verify backlog",
2517 .type = FIO_OPT_STR_VAL,
2518 .off1 = td_var_offset(verify_backlog),
2519 .help = "Verify after this number of blocks are written",
2522 .category = FIO_OPT_C_IO,
2523 .group = FIO_OPT_G_VERIFY,
2526 .name = "verify_backlog_batch",
2527 .lname = "Verify backlog batch",
2528 .type = FIO_OPT_INT,
2529 .off1 = td_var_offset(verify_batch),
2530 .help = "Verify this number of IO blocks",
2533 .category = FIO_OPT_C_IO,
2534 .group = FIO_OPT_G_VERIFY,
2536 #ifdef FIO_HAVE_CPU_AFFINITY
2538 .name = "verify_async_cpus",
2539 .lname = "Async verify CPUs",
2540 .type = FIO_OPT_STR,
2541 .cb = str_verify_cpus_allowed_cb,
2542 .off1 = td_var_offset(verify_cpumask),
2543 .help = "Set CPUs allowed for async verify threads",
2544 .parent = "verify_async",
2546 .category = FIO_OPT_C_IO,
2547 .group = FIO_OPT_G_VERIFY,
2551 .name = "experimental_verify",
2552 .off1 = td_var_offset(experimental_verify),
2553 .type = FIO_OPT_BOOL,
2554 .help = "Enable experimental verification",
2556 .category = FIO_OPT_C_IO,
2557 .group = FIO_OPT_G_VERIFY,
2560 .name = "verify_state_load",
2561 .lname = "Load verify state",
2562 .off1 = td_var_offset(verify_state),
2563 .type = FIO_OPT_BOOL,
2564 .help = "Load verify termination state",
2566 .category = FIO_OPT_C_IO,
2567 .group = FIO_OPT_G_VERIFY,
2570 .name = "verify_state_save",
2571 .lname = "Save verify state",
2572 .off1 = td_var_offset(verify_state_save),
2573 .type = FIO_OPT_BOOL,
2575 .help = "Save verify state on termination",
2577 .category = FIO_OPT_C_IO,
2578 .group = FIO_OPT_G_VERIFY,
2580 #ifdef FIO_HAVE_TRIM
2582 .name = "trim_percentage",
2583 .lname = "Trim percentage",
2584 .type = FIO_OPT_INT,
2585 .off1 = td_var_offset(trim_percentage),
2588 .help = "Number of verify blocks to discard/trim",
2593 .category = FIO_OPT_C_IO,
2594 .group = FIO_OPT_G_TRIM,
2597 .name = "trim_verify_zero",
2598 .lname = "Verify trim zero",
2599 .type = FIO_OPT_BOOL,
2600 .help = "Verify that trim/discarded blocks are returned as zeroes",
2601 .off1 = td_var_offset(trim_zero),
2602 .parent = "trim_percentage",
2605 .category = FIO_OPT_C_IO,
2606 .group = FIO_OPT_G_TRIM,
2609 .name = "trim_backlog",
2610 .lname = "Trim backlog",
2611 .type = FIO_OPT_STR_VAL,
2612 .off1 = td_var_offset(trim_backlog),
2613 .help = "Trim after this number of blocks are written",
2614 .parent = "trim_percentage",
2617 .category = FIO_OPT_C_IO,
2618 .group = FIO_OPT_G_TRIM,
2621 .name = "trim_backlog_batch",
2622 .lname = "Trim backlog batch",
2623 .type = FIO_OPT_INT,
2624 .off1 = td_var_offset(trim_batch),
2625 .help = "Trim this number of IO blocks",
2626 .parent = "trim_percentage",
2629 .category = FIO_OPT_C_IO,
2630 .group = FIO_OPT_G_TRIM,
2634 .name = "write_iolog",
2635 .lname = "Write I/O log",
2636 .type = FIO_OPT_STR_STORE,
2637 .off1 = td_var_offset(write_iolog_file),
2638 .help = "Store IO pattern to file",
2639 .category = FIO_OPT_C_IO,
2640 .group = FIO_OPT_G_IOLOG,
2643 .name = "read_iolog",
2644 .lname = "Read I/O log",
2645 .type = FIO_OPT_STR_STORE,
2646 .off1 = td_var_offset(read_iolog_file),
2647 .help = "Playback IO pattern from file",
2648 .category = FIO_OPT_C_IO,
2649 .group = FIO_OPT_G_IOLOG,
2652 .name = "replay_no_stall",
2653 .lname = "Don't stall on replay",
2654 .type = FIO_OPT_BOOL,
2655 .off1 = td_var_offset(no_stall),
2657 .parent = "read_iolog",
2659 .help = "Playback IO pattern file as fast as possible without stalls",
2660 .category = FIO_OPT_C_IO,
2661 .group = FIO_OPT_G_IOLOG,
2664 .name = "replay_redirect",
2665 .lname = "Redirect device for replay",
2666 .type = FIO_OPT_STR_STORE,
2667 .off1 = td_var_offset(replay_redirect),
2668 .parent = "read_iolog",
2670 .help = "Replay all I/O onto this device, regardless of trace device",
2671 .category = FIO_OPT_C_IO,
2672 .group = FIO_OPT_G_IOLOG,
2675 .name = "replay_scale",
2676 .lname = "Replace offset scale factor",
2677 .type = FIO_OPT_INT,
2678 .off1 = td_var_offset(replay_scale),
2679 .parent = "read_iolog",
2681 .help = "Align offsets to this blocksize",
2682 .category = FIO_OPT_C_IO,
2683 .group = FIO_OPT_G_IOLOG,
2686 .name = "replay_align",
2687 .lname = "Replace alignment",
2688 .type = FIO_OPT_INT,
2689 .off1 = td_var_offset(replay_align),
2690 .parent = "read_iolog",
2691 .help = "Scale offset down by this factor",
2692 .category = FIO_OPT_C_IO,
2693 .group = FIO_OPT_G_IOLOG,
2697 .name = "exec_prerun",
2698 .lname = "Pre-execute runnable",
2699 .type = FIO_OPT_STR_STORE,
2700 .off1 = td_var_offset(exec_prerun),
2701 .help = "Execute this file prior to running job",
2702 .category = FIO_OPT_C_GENERAL,
2703 .group = FIO_OPT_G_INVALID,
2706 .name = "exec_postrun",
2707 .lname = "Post-execute runnable",
2708 .type = FIO_OPT_STR_STORE,
2709 .off1 = td_var_offset(exec_postrun),
2710 .help = "Execute this file after running job",
2711 .category = FIO_OPT_C_GENERAL,
2712 .group = FIO_OPT_G_INVALID,
2714 #ifdef FIO_HAVE_IOSCHED_SWITCH
2716 .name = "ioscheduler",
2717 .lname = "I/O scheduler",
2718 .type = FIO_OPT_STR_STORE,
2719 .off1 = td_var_offset(ioscheduler),
2720 .help = "Use this IO scheduler on the backing device",
2721 .category = FIO_OPT_C_FILE,
2722 .group = FIO_OPT_G_INVALID,
2727 .lname = "Zone size",
2728 .type = FIO_OPT_STR_VAL,
2729 .off1 = td_var_offset(zone_size),
2730 .help = "Amount of data to read per zone",
2732 .interval = 1024 * 1024,
2733 .category = FIO_OPT_C_IO,
2734 .group = FIO_OPT_G_ZONE,
2737 .name = "zonerange",
2738 .lname = "Zone range",
2739 .type = FIO_OPT_STR_VAL,
2740 .off1 = td_var_offset(zone_range),
2741 .help = "Give size of an IO zone",
2743 .interval = 1024 * 1024,
2744 .category = FIO_OPT_C_IO,
2745 .group = FIO_OPT_G_ZONE,
2749 .lname = "Zone skip",
2750 .type = FIO_OPT_STR_VAL,
2751 .off1 = td_var_offset(zone_skip),
2752 .help = "Space between IO zones",
2754 .interval = 1024 * 1024,
2755 .category = FIO_OPT_C_IO,
2756 .group = FIO_OPT_G_ZONE,
2760 .lname = "Lock memory",
2761 .type = FIO_OPT_STR_VAL,
2762 .off1 = td_var_offset(lockmem),
2763 .help = "Lock down this amount of memory (per worker)",
2765 .interval = 1024 * 1024,
2766 .category = FIO_OPT_C_GENERAL,
2767 .group = FIO_OPT_G_INVALID,
2770 .name = "rwmixread",
2771 .lname = "Read/write mix read",
2772 .type = FIO_OPT_INT,
2773 .cb = str_rwmix_read_cb,
2774 .off1 = td_var_offset(rwmix[DDIR_READ]),
2776 .help = "Percentage of mixed workload that is reads",
2779 .inverse = "rwmixwrite",
2780 .category = FIO_OPT_C_IO,
2781 .group = FIO_OPT_G_RWMIX,
2784 .name = "rwmixwrite",
2785 .lname = "Read/write mix write",
2786 .type = FIO_OPT_INT,
2787 .cb = str_rwmix_write_cb,
2788 .off1 = td_var_offset(rwmix[DDIR_WRITE]),
2790 .help = "Percentage of mixed workload that is writes",
2793 .inverse = "rwmixread",
2794 .category = FIO_OPT_C_IO,
2795 .group = FIO_OPT_G_RWMIX,
2798 .name = "rwmixcycle",
2799 .lname = "Read/write mix cycle",
2800 .type = FIO_OPT_DEPRECATED,
2801 .category = FIO_OPT_C_IO,
2802 .group = FIO_OPT_G_RWMIX,
2807 .type = FIO_OPT_INT,
2808 .off1 = td_var_offset(nice),
2809 .help = "Set job CPU nice value",
2814 .category = FIO_OPT_C_GENERAL,
2815 .group = FIO_OPT_G_CRED,
2817 #ifdef FIO_HAVE_IOPRIO
2820 .lname = "I/O nice priority",
2821 .type = FIO_OPT_INT,
2822 .off1 = td_var_offset(ioprio),
2823 .help = "Set job IO priority value",
2827 .category = FIO_OPT_C_GENERAL,
2828 .group = FIO_OPT_G_CRED,
2831 .name = "prioclass",
2832 .lname = "I/O nice priority class",
2833 .type = FIO_OPT_INT,
2834 .off1 = td_var_offset(ioprio_class),
2835 .help = "Set job IO priority class",
2839 .category = FIO_OPT_C_GENERAL,
2840 .group = FIO_OPT_G_CRED,
2844 .name = "thinktime",
2845 .lname = "Thinktime",
2846 .type = FIO_OPT_INT,
2847 .off1 = td_var_offset(thinktime),
2848 .help = "Idle time between IO buffers (usec)",
2851 .category = FIO_OPT_C_IO,
2852 .group = FIO_OPT_G_THINKTIME,
2855 .name = "thinktime_spin",
2856 .lname = "Thinktime spin",
2857 .type = FIO_OPT_INT,
2858 .off1 = td_var_offset(thinktime_spin),
2859 .help = "Start think time by spinning this amount (usec)",
2862 .parent = "thinktime",
2864 .category = FIO_OPT_C_IO,
2865 .group = FIO_OPT_G_THINKTIME,
2868 .name = "thinktime_blocks",
2869 .lname = "Thinktime blocks",
2870 .type = FIO_OPT_INT,
2871 .off1 = td_var_offset(thinktime_blocks),
2872 .help = "IO buffer period between 'thinktime'",
2874 .parent = "thinktime",
2876 .category = FIO_OPT_C_IO,
2877 .group = FIO_OPT_G_THINKTIME,
2881 .lname = "I/O rate",
2882 .type = FIO_OPT_INT,
2883 .off1 = td_var_offset(rate[DDIR_READ]),
2884 .off2 = td_var_offset(rate[DDIR_WRITE]),
2885 .off3 = td_var_offset(rate[DDIR_TRIM]),
2886 .help = "Set bandwidth rate",
2887 .category = FIO_OPT_C_IO,
2888 .group = FIO_OPT_G_RATE,
2892 .lname = "I/O min rate",
2893 .type = FIO_OPT_INT,
2894 .off1 = td_var_offset(ratemin[DDIR_READ]),
2895 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2896 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2897 .help = "Job must meet this rate or it will be shutdown",
2900 .category = FIO_OPT_C_IO,
2901 .group = FIO_OPT_G_RATE,
2904 .name = "rate_iops",
2905 .lname = "I/O rate IOPS",
2906 .type = FIO_OPT_INT,
2907 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2908 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2909 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2910 .help = "Limit IO used to this number of IO operations/sec",
2912 .category = FIO_OPT_C_IO,
2913 .group = FIO_OPT_G_RATE,
2916 .name = "rate_iops_min",
2917 .lname = "I/O min rate IOPS",
2918 .type = FIO_OPT_INT,
2919 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2920 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2921 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2922 .help = "Job must meet this rate or it will be shut down",
2923 .parent = "rate_iops",
2925 .category = FIO_OPT_C_IO,
2926 .group = FIO_OPT_G_RATE,
2929 .name = "ratecycle",
2930 .lname = "I/O rate cycle",
2931 .type = FIO_OPT_INT,
2932 .off1 = td_var_offset(ratecycle),
2933 .help = "Window average for rate limits (msec)",
2937 .category = FIO_OPT_C_IO,
2938 .group = FIO_OPT_G_RATE,
2941 .name = "max_latency",
2942 .type = FIO_OPT_INT,
2943 .off1 = td_var_offset(max_latency),
2944 .help = "Maximum tolerated IO latency (usec)",
2946 .category = FIO_OPT_C_IO,
2947 .group = FIO_OPT_G_LATPROF,
2950 .name = "latency_target",
2951 .lname = "Latency Target (usec)",
2952 .type = FIO_OPT_STR_VAL_TIME,
2953 .off1 = td_var_offset(latency_target),
2954 .help = "Ramp to max queue depth supporting this latency",
2956 .category = FIO_OPT_C_IO,
2957 .group = FIO_OPT_G_LATPROF,
2960 .name = "latency_window",
2961 .lname = "Latency Window (usec)",
2962 .type = FIO_OPT_STR_VAL_TIME,
2963 .off1 = td_var_offset(latency_window),
2964 .help = "Time to sustain latency_target",
2966 .category = FIO_OPT_C_IO,
2967 .group = FIO_OPT_G_LATPROF,
2970 .name = "latency_percentile",
2971 .lname = "Latency Percentile",
2972 .type = FIO_OPT_FLOAT_LIST,
2973 .off1 = td_var_offset(latency_percentile),
2974 .help = "Percentile of IOs must be below latency_target",
2979 .category = FIO_OPT_C_IO,
2980 .group = FIO_OPT_G_LATPROF,
2983 .name = "invalidate",
2984 .lname = "Cache invalidate",
2985 .type = FIO_OPT_BOOL,
2986 .off1 = td_var_offset(invalidate_cache),
2987 .help = "Invalidate buffer/page cache prior to running job",
2989 .category = FIO_OPT_C_IO,
2990 .group = FIO_OPT_G_IO_TYPE,
2994 .lname = "Synchronous I/O",
2995 .type = FIO_OPT_BOOL,
2996 .off1 = td_var_offset(sync_io),
2997 .help = "Use O_SYNC for buffered writes",
2999 .parent = "buffered",
3001 .category = FIO_OPT_C_IO,
3002 .group = FIO_OPT_G_IO_TYPE,
3005 .name = "create_serialize",
3006 .lname = "Create serialize",
3007 .type = FIO_OPT_BOOL,
3008 .off1 = td_var_offset(create_serialize),
3009 .help = "Serialize creating of job files",
3011 .category = FIO_OPT_C_FILE,
3012 .group = FIO_OPT_G_INVALID,
3015 .name = "create_fsync",
3016 .lname = "Create fsync",
3017 .type = FIO_OPT_BOOL,
3018 .off1 = td_var_offset(create_fsync),
3019 .help = "fsync file after creation",
3021 .category = FIO_OPT_C_FILE,
3022 .group = FIO_OPT_G_INVALID,
3025 .name = "create_on_open",
3026 .lname = "Create on open",
3027 .type = FIO_OPT_BOOL,
3028 .off1 = td_var_offset(create_on_open),
3029 .help = "Create files when they are opened for IO",
3031 .category = FIO_OPT_C_FILE,
3032 .group = FIO_OPT_G_INVALID,
3035 .name = "create_only",
3036 .type = FIO_OPT_BOOL,
3037 .off1 = td_var_offset(create_only),
3038 .help = "Only perform file creation phase",
3039 .category = FIO_OPT_C_FILE,
3043 .name = "allow_file_create",
3044 .lname = "Allow file create",
3045 .type = FIO_OPT_BOOL,
3046 .off1 = td_var_offset(allow_create),
3047 .help = "Permit fio to create files, if they don't exist",
3049 .category = FIO_OPT_C_FILE,
3050 .group = FIO_OPT_G_FILENAME,
3053 .name = "allow_mounted_write",
3054 .lname = "Allow mounted write",
3055 .type = FIO_OPT_BOOL,
3056 .off1 = td_var_offset(allow_mounted_write),
3057 .help = "Allow writes to a mounted partition",
3059 .category = FIO_OPT_C_FILE,
3060 .group = FIO_OPT_G_FILENAME,
3064 .lname = "Pre-read files",
3065 .type = FIO_OPT_BOOL,
3066 .off1 = td_var_offset(pre_read),
3067 .help = "Pre-read files before starting official testing",
3069 .category = FIO_OPT_C_FILE,
3070 .group = FIO_OPT_G_INVALID,
3072 #ifdef FIO_HAVE_CPU_AFFINITY
3075 .lname = "CPU mask",
3076 .type = FIO_OPT_INT,
3077 .cb = str_cpumask_cb,
3078 .off1 = td_var_offset(cpumask),
3079 .help = "CPU affinity mask",
3080 .category = FIO_OPT_C_GENERAL,
3081 .group = FIO_OPT_G_CRED,
3084 .name = "cpus_allowed",
3085 .lname = "CPUs allowed",
3086 .type = FIO_OPT_STR,
3087 .cb = str_cpus_allowed_cb,
3088 .off1 = td_var_offset(cpumask),
3089 .help = "Set CPUs allowed",
3090 .category = FIO_OPT_C_GENERAL,
3091 .group = FIO_OPT_G_CRED,
3094 .name = "cpus_allowed_policy",
3095 .lname = "CPUs allowed distribution policy",
3096 .type = FIO_OPT_STR,
3097 .off1 = td_var_offset(cpus_allowed_policy),
3098 .help = "Distribution policy for cpus_allowed",
3099 .parent = "cpus_allowed",
3103 .oval = FIO_CPUS_SHARED,
3104 .help = "Mask shared between threads",
3107 .oval = FIO_CPUS_SPLIT,
3108 .help = "Mask split between threads",
3111 .category = FIO_OPT_C_GENERAL,
3112 .group = FIO_OPT_G_CRED,
3115 #ifdef CONFIG_LIBNUMA
3117 .name = "numa_cpu_nodes",
3118 .type = FIO_OPT_STR,
3119 .cb = str_numa_cpunodes_cb,
3120 .off1 = td_var_offset(numa_cpunodes),
3121 .help = "NUMA CPU nodes bind",
3122 .category = FIO_OPT_C_GENERAL,
3123 .group = FIO_OPT_G_INVALID,
3126 .name = "numa_mem_policy",
3127 .type = FIO_OPT_STR,
3128 .cb = str_numa_mpol_cb,
3129 .off1 = td_var_offset(numa_memnodes),
3130 .help = "NUMA memory policy setup",
3131 .category = FIO_OPT_C_GENERAL,
3132 .group = FIO_OPT_G_INVALID,
3136 .name = "end_fsync",
3137 .lname = "End fsync",
3138 .type = FIO_OPT_BOOL,
3139 .off1 = td_var_offset(end_fsync),
3140 .help = "Include fsync at the end of job",
3142 .category = FIO_OPT_C_FILE,
3143 .group = FIO_OPT_G_INVALID,
3146 .name = "fsync_on_close",
3147 .lname = "Fsync on close",
3148 .type = FIO_OPT_BOOL,
3149 .off1 = td_var_offset(fsync_on_close),
3150 .help = "fsync files on close",
3152 .category = FIO_OPT_C_FILE,
3153 .group = FIO_OPT_G_INVALID,
3157 .lname = "Unlink file",
3158 .type = FIO_OPT_BOOL,
3159 .off1 = td_var_offset(unlink),
3160 .help = "Unlink created files after job has completed",
3162 .category = FIO_OPT_C_FILE,
3163 .group = FIO_OPT_G_INVALID,
3167 .lname = "Exit-all on terminate",
3168 .type = FIO_OPT_STR_SET,
3169 .cb = str_exitall_cb,
3170 .help = "Terminate all jobs when one exits",
3171 .category = FIO_OPT_C_GENERAL,
3172 .group = FIO_OPT_G_PROCESS,
3175 .name = "stonewall",
3176 .lname = "Wait for previous",
3177 .alias = "wait_for_previous",
3178 .type = FIO_OPT_STR_SET,
3179 .off1 = td_var_offset(stonewall),
3180 .help = "Insert a hard barrier between this job and previous",
3181 .category = FIO_OPT_C_GENERAL,
3182 .group = FIO_OPT_G_PROCESS,
3185 .name = "new_group",
3186 .lname = "New group",
3187 .type = FIO_OPT_STR_SET,
3188 .off1 = td_var_offset(new_group),
3189 .help = "Mark the start of a new group (for reporting)",
3190 .category = FIO_OPT_C_GENERAL,
3191 .group = FIO_OPT_G_PROCESS,
3196 .type = FIO_OPT_STR_SET,
3197 .off1 = td_var_offset(use_thread),
3198 .help = "Use threads instead of processes",
3199 #ifdef CONFIG_NO_SHM
3203 .category = FIO_OPT_C_GENERAL,
3204 .group = FIO_OPT_G_PROCESS,
3207 .name = "per_job_logs",
3208 .type = FIO_OPT_BOOL,
3209 .off1 = td_var_offset(per_job_logs),
3210 .help = "Include job number in generated log files or not",
3212 .category = FIO_OPT_C_LOG,
3213 .group = FIO_OPT_G_INVALID,
3216 .name = "write_bw_log",
3217 .lname = "Write bandwidth log",
3218 .type = FIO_OPT_STR_STORE,
3219 .off1 = td_var_offset(bw_log_file),
3220 .help = "Write log of bandwidth during run",
3221 .category = FIO_OPT_C_LOG,
3222 .group = FIO_OPT_G_INVALID,
3225 .name = "write_lat_log",
3226 .lname = "Write latency log",
3227 .type = FIO_OPT_STR_STORE,
3228 .off1 = td_var_offset(lat_log_file),
3229 .help = "Write log of latency during run",
3230 .category = FIO_OPT_C_LOG,
3231 .group = FIO_OPT_G_INVALID,
3234 .name = "write_iops_log",
3235 .lname = "Write IOPS log",
3236 .type = FIO_OPT_STR_STORE,
3237 .off1 = td_var_offset(iops_log_file),
3238 .help = "Write log of IOPS during run",
3239 .category = FIO_OPT_C_LOG,
3240 .group = FIO_OPT_G_INVALID,
3243 .name = "log_avg_msec",
3244 .lname = "Log averaging (msec)",
3245 .type = FIO_OPT_INT,
3246 .off1 = td_var_offset(log_avg_msec),
3247 .help = "Average bw/iops/lat logs over this period of time",
3249 .category = FIO_OPT_C_LOG,
3250 .group = FIO_OPT_G_INVALID,
3253 .name = "log_offset",
3254 .lname = "Log offset of IO",
3255 .type = FIO_OPT_BOOL,
3256 .off1 = td_var_offset(log_offset),
3257 .help = "Include offset of IO for each log entry",
3259 .category = FIO_OPT_C_LOG,
3260 .group = FIO_OPT_G_INVALID,
3264 .name = "log_compression",
3265 .lname = "Log compression",
3266 .type = FIO_OPT_INT,
3267 .off1 = td_var_offset(log_gz),
3268 .help = "Log in compressed chunks of this size",
3269 .minval = 32 * 1024 * 1024ULL,
3270 .maxval = 512 * 1024 * 1024ULL,
3271 .category = FIO_OPT_C_LOG,
3272 .group = FIO_OPT_G_INVALID,
3275 .name = "log_store_compressed",
3276 .lname = "Log store compressed",
3277 .type = FIO_OPT_BOOL,
3278 .off1 = td_var_offset(log_gz_store),
3279 .help = "Store logs in a compressed format",
3280 .category = FIO_OPT_C_LOG,
3281 .group = FIO_OPT_G_INVALID,
3285 .name = "block_error_percentiles",
3286 .lname = "Block error percentiles",
3287 .type = FIO_OPT_BOOL,
3288 .off1 = td_var_offset(block_error_hist),
3289 .help = "Record trim block errors and make a histogram",
3291 .category = FIO_OPT_C_LOG,
3292 .group = FIO_OPT_G_INVALID,
3295 .name = "bwavgtime",
3296 .lname = "Bandwidth average time",
3297 .type = FIO_OPT_INT,
3298 .off1 = td_var_offset(bw_avg_time),
3299 .help = "Time window over which to calculate bandwidth"
3302 .parent = "write_bw_log",
3305 .category = FIO_OPT_C_LOG,
3306 .group = FIO_OPT_G_INVALID,
3309 .name = "iopsavgtime",
3310 .lname = "IOPS average time",
3311 .type = FIO_OPT_INT,
3312 .off1 = td_var_offset(iops_avg_time),
3313 .help = "Time window over which to calculate IOPS (msec)",
3315 .parent = "write_iops_log",
3318 .category = FIO_OPT_C_LOG,
3319 .group = FIO_OPT_G_INVALID,
3322 .name = "group_reporting",
3323 .lname = "Group reporting",
3324 .type = FIO_OPT_STR_SET,
3325 .off1 = td_var_offset(group_reporting),
3326 .help = "Do reporting on a per-group basis",
3327 .category = FIO_OPT_C_STAT,
3328 .group = FIO_OPT_G_INVALID,
3331 .name = "zero_buffers",
3332 .lname = "Zero I/O buffers",
3333 .type = FIO_OPT_STR_SET,
3334 .off1 = td_var_offset(zero_buffers),
3335 .help = "Init IO buffers to all zeroes",
3336 .category = FIO_OPT_C_IO,
3337 .group = FIO_OPT_G_IO_BUF,
3340 .name = "refill_buffers",
3341 .lname = "Refill I/O buffers",
3342 .type = FIO_OPT_STR_SET,
3343 .off1 = td_var_offset(refill_buffers),
3344 .help = "Refill IO buffers on every IO submit",
3345 .category = FIO_OPT_C_IO,
3346 .group = FIO_OPT_G_IO_BUF,
3349 .name = "scramble_buffers",
3350 .lname = "Scramble I/O buffers",
3351 .type = FIO_OPT_BOOL,
3352 .off1 = td_var_offset(scramble_buffers),
3353 .help = "Slightly scramble buffers on every IO submit",
3355 .category = FIO_OPT_C_IO,
3356 .group = FIO_OPT_G_IO_BUF,
3359 .name = "buffer_pattern",
3360 .lname = "Buffer pattern",
3361 .type = FIO_OPT_STR,
3362 .cb = str_buffer_pattern_cb,
3363 .off1 = td_var_offset(buffer_patte