Let fadvise_hint also apply too mmap engine and madvise
[fio.git] / options.c
index a224e7bdfcaf088e6c3a77274633eee55da55041..681052127be67b2db7fbaa6d1bf927f7fdbb0342 100644 (file)
--- 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);
@@ -2440,7 +2443,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .posval = {
                          { .ival = "0",
                            .oval = F_ADV_NONE,
-                           .help = "Don't issue fadvise",
+                           .help = "Don't issue fadvise/madvise",
                          },
                          { .ival = "1",
                            .oval = F_ADV_TYPE,
@@ -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)",