From: Avi Kivity NFS direct writes take inode->i_rwsem shared, via nfs_start_io_direct(), so they already run in parallel against a single inode. Without FOP_DIO_PARALLEL_WRITE io_uring hashes any O_DIRECT write it has to punt onto a per-inode work queue, needlessly serialising them. Assisted-by: Claude:claude-opus-5 Signed-off-by: Avi Kivity --- fs/nfs/file.c | 2 +- fs/nfs/nfs4file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 8e119b55577d9..0259c3a07f72b 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -1015,8 +1015,8 @@ const struct file_operations nfs_file_operations = { .lock = nfs_lock, .flock = nfs_flock, .splice_read = nfs_file_splice_read, .splice_write = iter_file_splice_write, .check_flags = nfs_check_flags, - .fop_flags = FOP_DONTCACHE, + .fop_flags = FOP_DONTCACHE | FOP_DIO_PARALLEL_WRITE, }; EXPORT_SYMBOL_GPL(nfs_file_operations); diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 1cbb4160377c3..bdb8012f3d2e9 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -459,7 +459,7 @@ const struct file_operations nfs4_file_operations = { .fallocate = nfs42_fallocate, .remap_file_range = nfs42_remap_file_range, #else .llseek = nfs_file_llseek, #endif - .fop_flags = FOP_DONTCACHE, + .fop_flags = FOP_DONTCACHE | FOP_DIO_PARALLEL_WRITE, }; -- 2.56.1