From 21c1b29e929c2875f6dba7dfb6b0cc061f3730b5 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 7 Mar 2017 22:13:05 +0200 Subject: [PATCH] HOWTO: Add some details for invalidate= Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- HOWTO | 4 +++- init.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/HOWTO b/HOWTO index 6d903bba..c2c65096 100644 --- 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 - 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 diff --git a/init.c b/init.c index 53538903..18538de1 100644 --- a/init.c +++ b/init.c @@ -764,7 +764,11 @@ static int fixup_options(struct thread_data *td) } 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"); -- 2.25.1