From: Łukasz Stolarczuk Date: Mon, 11 Jan 2021 12:41:54 +0000 (+0100) Subject: engines/libpmem: set file open/create mode always to RW X-Git-Tag: fio-3.28~65^2~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ebcdccdeeec1673b8f7b12c4176d19982ddad7cd;p=fio.git engines/libpmem: set file open/create mode always to RW previously, when created file with a 'write' job it couldn't be open later on, when a 'read' job was ran. Signed-off-by: Łukasz Stolarczuk --- diff --git a/engines/libpmem.c b/engines/libpmem.c index 2338f0fa..364e384d 100644 --- a/engines/libpmem.c +++ b/engines/libpmem.c @@ -2,7 +2,7 @@ * libpmem: IO engine that uses PMDK libpmem to read and write data * * Copyright (C) 2017 Nippon Telegraph and Telephone Corporation. - * Copyright 2018-2020, Intel Corporation + * Copyright 2018-2021, Intel Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, @@ -97,17 +97,10 @@ static int fio_libpmem_file(struct thread_data *td, struct fio_file *f, size_t length, off_t off) { struct fio_libpmem_data *fdd = FILE_ENG_DATA(f); - mode_t mode = 0; + mode_t mode = S_IWUSR | S_IRUSR; size_t mapped_len; int is_pmem; - if(td_rw(td)) - mode = S_IWUSR | S_IRUSR; - else if (td_write(td)) - mode = S_IWUSR; - else - mode = S_IRUSR; - dprint(FD_IO, "DEBUG fio_libpmem_file\n"); dprint(FD_IO, "f->file_name = %s td->o.verify = %d \n", f->file_name, td->o.verify);