Set RWF_ATOMIC for writes and oatomic==1. Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx> --- engines/sync.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/engines/sync.c b/engines/sync.c index d1999122..6317adbd 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -182,9 +182,11 @@ static enum fio_q_status fio_pvsyncio2_queue(struct thread_data *td, if (io_u->ddir == DDIR_READ) ret = preadv2(f->fd, iov, 1, io_u->offset, flags); - else if (io_u->ddir == DDIR_WRITE) + else if (io_u->ddir == DDIR_WRITE) { + if (td->o.oatomic) + flags |= RWF_ATOMIC; ret = pwritev2(f->fd, iov, 1, io_u->offset, flags); - else if (io_u->ddir == DDIR_TRIM) { + } else if (io_u->ddir == DDIR_TRIM) { do_io_u_trim(td, io_u); return FIO_Q_COMPLETED; } else @@ -483,7 +485,8 @@ static struct ioengine_ops ioengine_pvrw2 = { .open_file = generic_open_file, .close_file = generic_close_file, .get_file_size = generic_get_file_size, - .flags = FIO_SYNCIO, + .flags = FIO_SYNCIO | + FIO_ATOMICWRITES, .options = options, .option_struct_size = sizeof(struct psyncv2_options), }; -- 2.31.1