Skip to content

Commit

Permalink
For nfs engine, treat randwrite the same as write when opening file
Browse files Browse the repository at this point in the history
When use nfs engine, only write mode can work if file doesn't exist,
otherwise user has to make sure file exists before test starts.
This change will support randwrite mode when file doesn't exist.

Pan Xiao <[email protected]>
  • Loading branch information
Pan Xiao committed Jun 13, 2024
1 parent bd7492a commit 7d993b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->o.td_ddir == TD_DDIR_WRITE || td->o.td_ddir == TD_DDIR_RANDWRITE)
flags |= O_CREAT | O_RDWR;
else
flags |= O_RDWR;
Expand Down

0 comments on commit 7d993b1

Please sign in to comment.