From: Tomohiro Kusumi Date: Tue, 7 Mar 2017 20:13:05 +0000 (+0200) Subject: HOWTO: Add some details for invalidate= X-Git-Tag: fio-2.19~44 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=21c1b29e929c2875f6dba7dfb6b0cc061f3730b5;p=fio.git HOWTO: Add some details for invalidate= Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- 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");