Skip to content
Commit 837bb1d7 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4.2: Fix writeback races in nfs4_copy_file_range



We need to ensure that any writes to the destination file are serialised
with the copy, meaning that the writeback has to occur under the inode lock.

Also relax the writeback requirement on the source, and rely on the
stateid checking to tell us if the source rebooted. Add the helper
nfs_filemap_write_and_wait_range() to call pnfs_sync_inode() as
is appropriate for pNFS servers that may need a layoutcommit.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 1e564d3d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment