public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@kernel.org>
To: Olga Kornievskaia <okorniev@redhat.com>, anna@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFSv4.2: fix COPY attrs in presence of delegated timestamps
Date: Mon, 13 Apr 2026 14:23:50 -0700	[thread overview]
Message-ID: <041028abe38b53ef0e12ddfd20e5e11ee713a950.camel@kernel.org> (raw)
In-Reply-To: <20260327165757.28948-1-okorniev@redhat.com>

On Fri, 2026-03-27 at 12:57 -0400, Olga Kornievskaia wrote:
> A similar to generic/407 test can be done with a COPY operation
> instead of CLONE (reflink). And it leads to same problem that ctime
> and mtime saved before doing a "cp" operation are the same as after.
> 
> Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
> ---
>  fs/nfs/nfs42proc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index f77372a78be7..ea420dc94875 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -502,6 +502,12 @@ static ssize_t _nfs42_proc_copy(struct file
> *src,
>  
>  	nfs42_copy_dest_done(dst, pos_dst, res->write_res.count,
> oldsize_dst);
>  	nfs_invalidate_atime(src_inode);
> +	if (nfs_have_delegated_attributes(dst_inode)) {
> +		nfs_update_delegated_mtime(dst_inode);
> +		spin_lock(&dst_inode->i_lock);
> +		nfs_set_cache_invalid(dst_inode,
> NFS_INO_INVALID_BLOCKS);
> +		spin_unlock(&dst_inode->i_lock);

Isn't NFS_INO_INVALID_BLOCKS already set it nfs42_copy_dest_done()?

> +	}
>  	status = res->write_res.count;
>  out:
>  	if (args->sync)

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com

      parent reply	other threads:[~2026-04-13 21:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 16:57 [PATCH 1/1] NFSv4.2: fix COPY attrs in presence of delegated timestamps Olga Kornievskaia
2026-03-27 17:08 ` Olga Kornievskaia
2026-04-03 13:43   ` Jeff Layton
2026-04-08 19:05 ` Olga Kornievskaia
2026-04-13 21:23 ` Trond Myklebust [this message]

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=041028abe38b53ef0e12ddfd20e5e11ee713a950.camel@kernel.org \
    --to=trondmy@kernel.org \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okorniev@redhat.com \
    /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