• Trond Myklebust's avatar
    NFSv4.2: Fix writeback races in nfs4_copy_file_range · 837bb1d7
    Trond Myklebust authored
    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>
    837bb1d7
write.c 55.1 KB