Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For nfs engine, treat randwrite the same as write when opening file #1775

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just use:

if (td_write(td))

it's just a basic bug in the NFS engine, that it checks specifically for == TD_DDIR_WRITE rather than & TD_DDIR_WRITE.

flags |= O_CREAT | O_RDWR;
else
flags |= O_RDWR;
Expand Down
Loading