options: warn if we exceed the supported number of split entries
[fio.git] / init.c
diff --git a/init.c b/init.c
index acbbd4858b663efdb95bd9d4a2eb46299081cba4..607f7e0c29a472443b8bf90466ffe5ea5f8be4cf 100644 (file)
--- a/init.c
+++ b/init.c
@@ -925,6 +925,13 @@ static int fixup_options(struct thread_data *td)
                ret = 1;
        }
 
+       /*
+        * Fix these up to be nsec internally
+        */
+       o->max_latency *= 1000ULL;
+       o->latency_target *= 1000ULL;
+       o->latency_window *= 1000ULL;
+
        return ret;
 }
 
@@ -1105,6 +1112,7 @@ int ioengine_load(struct thread_data *td)
 static void init_flags(struct thread_data *td)
 {
        struct thread_options *o = &td->o;
+       int i;
 
        if (o->verify_backlog)
                td->flags |= TD_F_VER_BACKLOG;
@@ -1134,6 +1142,13 @@ static void init_flags(struct thread_data *td)
 
        if (o->mem_type == MEM_CUDA_MALLOC)
                td->flags &= ~TD_F_SCRAMBLE_BUFFERS;
+
+       for (i = 0; i < DDIR_RWDIR_CNT; i++) {
+               if (option_check_rate(td, i)) {
+                       td->flags |= TD_F_CHECK_RATE;
+                       break;
+               }
+       }
 }
 
 static int setup_random_seeds(struct thread_data *td)