HOWTO: Add some details for invalidate=
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 7 Mar 2017 20:13:05 +0000 (22:13 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 10 Mar 2017 21:43:37 +0000 (14:43 -0700)
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
HOWTO
init.c

diff --git a/HOWTO b/HOWTO
index 6d903bba0cb372745767ca7f81afcd19aefbc544..c2c65096bbd22461590c502aba6771b26598f672 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1426,7 +1426,9 @@ Buffers and memory
 .. option:: invalidate=bool
 
        Invalidate the buffer/page cache parts for this file prior to starting
 .. option:: invalidate=bool
 
        Invalidate the buffer/page cache parts for this file prior to starting
-       I/O. Defaults to true.
+       I/O if the platform and file type support it. Defaults to true.
+       This will be ignored if :option:`pre_read` is also specified for the
+       same job.
 
 .. option:: sync=bool
 
 
 .. option:: sync=bool
 
diff --git a/init.c b/init.c
index 5353890393d56ba86faa94e7ca53c4f5fa82a9c5..18538de1537d285623007dc975acf953dc1fce17 100644 (file)
--- a/init.c
+++ b/init.c
@@ -764,7 +764,11 @@ static int fixup_options(struct thread_data *td)
        }
 
        if (o->pre_read) {
        }
 
        if (o->pre_read) {
-               o->invalidate_cache = 0;
+               if (o->invalidate_cache) {
+                       log_info("fio: ignore invalidate option for %s\n",
+                                o->name);
+                       o->invalidate_cache = 0;
+               }
                if (td_ioengine_flagged(td, FIO_PIPEIO)) {
                        log_info("fio: cannot pre-read files with an IO engine"
                                 " that isn't seekable. Pre-read disabled.\n");
                if (td_ioengine_flagged(td, FIO_PIPEIO)) {
                        log_info("fio: cannot pre-read files with an IO engine"
                                 " that isn't seekable. Pre-read disabled.\n");