NFSv4.2: Serialise O_DIRECT i/o and copy range

Ensure that all O_DIRECT reads and writes complete before copying a file
range, so that the destination is up to date.

Fixes: a5864c999d ("NFS: Do not serialise O_DIRECT reads and writes")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Trond Myklebust
2025-09-06 10:54:13 -04:00
parent c80ebeba11
commit ca247c8990

View File

@@ -445,6 +445,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
return status;
}
nfs_file_block_o_direct(NFS_I(dst_inode));
status = nfs_sync_inode(dst_inode);
if (status)
return status;