Skip to content

Commit

Permalink
NFSv42: Don't force attribute revalidation of the copy offload source
Browse files Browse the repository at this point in the history
When a copy offload is performed, we do not expect the source file to
change other than perhaps to see the atime be updated.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Apr 14, 2021
1 parent 94d202d commit febfeaa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/nfs/nfs42proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
}

nfs42_copy_dest_done(dst_inode, pos_dst, res->write_res.count);

spin_lock(&src_inode->i_lock);
nfs_set_cache_invalid(src_inode, NFS_INO_REVAL_PAGECACHE |
NFS_INO_REVAL_FORCED |
NFS_INO_INVALID_ATIME);
spin_unlock(&src_inode->i_lock);
nfs_invalidate_atime(src_inode);
status = res->write_res.count;
out:
if (args->sync)
Expand Down

0 comments on commit febfeaa

Please sign in to comment.