]> git.karo-electronics.de Git - linux-beck.git/commit
NFSv4.2: Fix writeback races in nfs4_copy_file_range
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 25 Jun 2016 22:12:03 +0000 (18:12 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Jul 2016 23:11:07 +0000 (19:11 -0400)
commit837bb1d752d92ea4d870877ffbd6ec5cf76624b3
treebc6efb2d8fff743b5dd56ed0848fa9f4f99c2e3c
parent1e564d3dbd684a105582471cb9ff2aada64a9052
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: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/internal.h
fs/nfs/nfs42proc.c
fs/nfs/nfs4file.c
fs/nfs/write.c