From 6cd5aeb443fe37aafbbeed50c37f0d7ab48f2e7d Mon Sep 17 00:00:00 2001 From: Pan Xiao Date: Fri, 14 Jun 2024 13:51:07 +0800 Subject: [PATCH] Fix issue when start randwrite by using nfs engine Use td_write(td) instead of td->o.td_ddir == TD_DDIR_WRITE So fio will treat write and randwrite the same way when start jobs by using NFS engine. Pan Xiao --- engines/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/nfs.c b/engines/nfs.c index ce748d1448..6bc4af1fac 100644 --- a/engines/nfs.c +++ b/engines/nfs.c @@ -280,7 +280,7 @@ static int fio_libnfs_open(struct thread_data *td, struct fio_file *f) nfs_data = calloc(1, sizeof(struct nfs_data)); nfs_data->options = options; - if (td->o.td_ddir == TD_DDIR_WRITE) + if (td_write(td)) flags |= O_CREAT | O_RDWR; else flags |= O_RDWR;