Make pre_read imply invalidate=0
authorJens Axboe <jens.axboe@oracle.com>
Tue, 2 Jun 2009 12:19:25 +0000 (14:19 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 2 Jun 2009 12:19:25 +0000 (14:19 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
HOWTO
init.c

diff --git a/HOWTO b/HOWTO
index e22f745..494b3e6 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -714,7 +714,9 @@ create_on_open=bool Don't pre-setup the files for IO, just create open()
                        when it's time to do IO to that file.
 
 pre_read=bool  If this is given, files will be pre-read into memory before
-               starting the given IO operation.
+               starting the given IO operation. This will also clear
+               the 'invalidate' flag, since it is pointless to pre-read
+               and then drop the cache.
 
 unlink=bool    Unlink the job files when done. Not the default, as repeated
                runs of that job would then waste time recreating the file
diff --git a/init.c b/init.c
index 07068d7..7681102 100644 (file)
--- a/init.c
+++ b/init.c
@@ -357,6 +357,9 @@ static int fixup_options(struct thread_data *td)
        if (td->o.verify != VERIFY_NONE)
                td->o.refill_buffers = 1;
 
+       if (td->o.pre_read)
+               td->o.invalidate_cache = 0;
+
        return 0;
 }