Add pre_read option
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 4a02f2ebee198584e477f5e6b8749447c6f94463..185f99a78817d1ca50465c7b7828bb9798bc1387 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -1018,6 +1018,11 @@ static void *thread_main(void *data)
                        goto err;
        }
 
+       if (td->o.pre_read) {
+               if (pre_read_files(td) < 0)
+                       goto err;
+       }
+
        fio_gettime(&td->epoch, NULL);
        getrusage(RUSAGE_SELF, &td->ts.ru_start);