Fix issue when start randwrite by using nfs engine
authorPan Xiao <pan.xiao@dell.com>
Fri, 14 Jun 2024 05:51:07 +0000 (13:51 +0800)
committerPan Xiao <pan.xiao@dell.com>
Fri, 14 Jun 2024 05:51:07 +0000 (13:51 +0800)
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 <xiaopan@outlook.com>

engines/nfs.c

index ce748d1448ef4b852aaa7cef0c2d2579129c70e9..6bc4af1fac76851c4498354bc643ea31bfcbca1a 100644 (file)
@@ -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;