Linux NFS development
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: trondmy@kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>,
	Olga Kornievskaia <kolga@netapp.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFSv42: Don't force attribute revalidation of the copy offload source
Date: Wed, 14 Apr 2021 10:40:33 -0400	[thread overview]
Message-ID: <20210414144033.GC16800@fieldses.org> (raw)
In-Reply-To: <20210414143138.15192-2-trondmy@kernel.org>

Thanks!  Testing....

--b.

On Wed, Apr 14, 2021 at 10:31:38AM -0400, trondmy@kernel.org wrote:
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
> 
> 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>
> ---
>  fs/nfs/nfs42proc.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index 3875120ef3ef..a24349512ffe 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -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)
> -- 
> 2.30.2

  reply	other threads:[~2021-04-14 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 14:31 [PATCH 1/2] NFSv42: Copy offload should update the file size when appropriate trondmy
2021-04-14 14:31 ` [PATCH 2/2] NFSv42: Don't force attribute revalidation of the copy offload source trondmy
2021-04-14 14:40   ` J. Bruce Fields [this message]
2021-04-14 17:05     ` J. Bruce Fields
2021-04-14 17:23       ` Trond Myklebust
2021-04-14 17:28         ` bfields
2021-04-14 20:15           ` bfields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210414144033.GC16800@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=bfields@redhat.com \
    --cc=kolga@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox