From: Barak Pinhas Date: Tue, 5 Dec 2017 12:23:22 +0000 (+0200) Subject: fix verify_only when using ioengine=mmap X-Git-Tag: fio-3.4~36^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=81a1ee613fc6aea92bc2ca5500e8e7b5ba24cc8e 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 --- 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)