From 34f1c044d361d04a576c3e7ed387fe064f9db5c6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 2 Jun 2009 14:19:25 +0200 Subject: [PATCH] Make pre_read imply invalidate=0 Signed-off-by: Jens Axboe --- HOWTO | 4 +++- init.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HOWTO b/HOWTO index e22f7454..494b3e64 100644 --- 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 07068d74..7681102b 100644 --- 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; } -- 2.25.1