X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=9a3431d8723147b31e783bcc60d423a589e2ae56;hp=a224e7bdfcaf088e6c3a77274633eee55da55041;hb=395feabb53806d5cff2e0b73b6c94048f05b5aae;hpb=6c3fb04c80c3c241162e743a54761e5e896d4ba2 diff --git a/options.c b/options.c index a224e7bd..9a3431d8 100644 --- a/options.c +++ b/options.c @@ -61,7 +61,8 @@ struct split { }; static int split_parse_ddir(struct thread_options *o, struct split *split, - enum fio_ddir ddir, char *str, bool absolute) + enum fio_ddir ddir, char *str, bool absolute, + unsigned int max_splits) { unsigned long long perc; unsigned int i; @@ -109,8 +110,10 @@ static int split_parse_ddir(struct thread_options *o, struct split *split, split->val1[i] = val; split->val2[i] = perc; i++; - if (i == ZONESPLIT_MAX) + if (i == max_splits) { + log_err("fio: hit max of %d split entries\n", i); break; + } } split->nr = i; @@ -126,7 +129,7 @@ static int bssplit_ddir(struct thread_options *o, enum fio_ddir ddir, char *str, memset(&split, 0, sizeof(split)); - if (split_parse_ddir(o, &split, ddir, str, data)) + if (split_parse_ddir(o, &split, ddir, str, data, BSSPLIT_MAX)) return 1; if (!split.nr) return 0; @@ -846,7 +849,7 @@ static int zone_split_ddir(struct thread_options *o, enum fio_ddir ddir, memset(&split, 0, sizeof(split)); - if (split_parse_ddir(o, &split, ddir, str, absolute)) + if (split_parse_ddir(o, &split, ddir, str, absolute, ZONESPLIT_MAX)) return 1; if (!split.nr) return 0; @@ -1127,9 +1130,9 @@ static int str_steadystate_cb(void *data, const char *str) if (parse_dryrun()) return 0; - td->o.ss_state |= __FIO_SS_PCT; + td->o.ss_state |= FIO_SS_PCT; td->o.ss_limit.u.f = val; - } else if (td->o.ss_state & __FIO_SS_IOPS) { + } else if (td->o.ss_state & FIO_SS_IOPS) { if (!str_to_float(nr, &val, 0)) { log_err("fio: steadystate IOPS threshold postfix parsing failed\n"); free(nr); @@ -3456,6 +3459,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_IO, .group = FIO_OPT_G_RATE, }, + { + .name = "rate_ignore_thinktime", + .lname = "Rate ignore thinktime", + .type = FIO_OPT_BOOL, + .off1 = offsetof(struct thread_options, rate_ign_think), + .help = "Rated IO ignores thinktime settings", + .parent = "rate", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_RATE, + }, { .name = "max_latency", .lname = "Max Latency (usec)",