From 81a1ee613fc6aea92bc2ca5500e8e7b5ba24cc8e Mon Sep 17 00:00:00 2001 From: Barak Pinhas Date: Tue, 5 Dec 2017 14:23:22 +0200 Subject: [PATCH] fix verify_only when using ioengine=mmap verify_only was opening the file with O_RDONLY and the mmap engine was trying to mmap it with PROT_READ | PROTWRITE hence getting -EACCESS and failing the job --- engines/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/mmap.c b/engines/mmap.c index bc038f4f..51606e12 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -33,9 +33,9 @@ static int fio_mmap_file(struct thread_data *td, struct fio_file *f, struct fio_mmap_data *fmd = FILE_ENG_DATA(f); int flags = 0; - if (td_rw(td)) + if (td_rw(td) && !td->o.verify_only) flags = PROT_READ | PROT_WRITE; - else if (td_write(td)) { + else if (td_write(td) && !td->o.verify_only) { flags = PROT_WRITE; if (td->o.verify != VERIFY_NONE) -- 2.25.1