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 e22f745469324ea4a355c5792f88ddec2ac90ef1..494b3e64d722597405e6a82191f776c1b8bc35d7 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 07068d74f4a05e576b185d0c2ce7067c59eb45e8..7681102bd506353e05257442e5279c64b43f9bcc 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;
 }