mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhi Li <yieli@redhat.com>,
	Benjamin Coddington <bcodding@redhat.com>
Subject: Re: [PATCH] nfsd: fix change_info in NFSv4 RENAME replies
Date: Sat, 09 Sep 2023 13:23:38 -0400	[thread overview]
Message-ID: <18563ba8226cdc28b3c9c91214dbb936b6ad7a01.camel@kernel.org> (raw)
In-Reply-To: <ZPyMyv1nNFV2whKP@tissot.1015granger.net>

On Sat, 2023-09-09 at 11:18 -0400, Chuck Lever wrote:
> On Sat, Sep 09, 2023 at 07:12:30AM -0400, Jeff Layton wrote:
> > nfsd sends the transposed directory change info in the RENAME reply. The
> > source directory is in save_fh and the target is in current_fh.
> > 
> > Reported-by: Zhi Li <yieli@redhat.com>
> > Reported-by: Benjamin Coddington <bcodding@redhat.com>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> > This bug predates git, so I can't add a proper Fixes tag. I think this
> > is probably appropriate for stable series kernels though.
> > 
> > This bug was largely papered over by the fact that we factored in the
> > ctime when generating a change attribute. Since this commit, however:
> > 
> >     638e3e7d9493 nfsd: use the getattr operation to fetch i_version
> > 
> > We stopped doing that for directory inodes and that caused this bug to
> > pop up.
> 
> Applied to nfsd-fixes with a "Cc: stable" tag added.
> 
> Is there a publicly-accessible bug report link that can be included?
> 
> 

Yes. I just made this one public:

    https://bugzilla.redhat.com/show_bug.cgi?id=2218844

It has Ben's reproducer script for this in it too.

> > ---
> >  fs/nfsd/nfs4proc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> > index 5ca748309c26..4199ede0583c 100644
> > --- a/fs/nfsd/nfs4proc.c
> > +++ b/fs/nfsd/nfs4proc.c
> > @@ -1058,8 +1058,8 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> >  			     rename->rn_tname, rename->rn_tnamelen);
> >  	if (status)
> >  		return status;
> > -	set_change_info(&rename->rn_sinfo, &cstate->current_fh);
> > -	set_change_info(&rename->rn_tinfo, &cstate->save_fh);
> > +	set_change_info(&rename->rn_sinfo, &cstate->save_fh);
> > +	set_change_info(&rename->rn_tinfo, &cstate->current_fh);
> >  	return nfs_ok;
> >  }
> >  
> > 
> > ---
> > base-commit: dd1386dd3c4f4bc55456c88180f9f39697bb95c0
> > change-id: 20230908-nfsd-fixes-f5bdb87e6035
> > 
> > Best regards,
> > -- 
> > Jeff Layton <jlayton@kernel.org>
> > 
> 

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-09-09 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 11:12 Jeff Layton
2023-09-09 15:18 ` Chuck Lever
2023-09-09 17:23   ` Jeff Layton [this message]
2023-09-09 19:59     ` Chuck Lever III

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=18563ba8226cdc28b3c9c91214dbb936b6ad7a01.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=kolga@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tom@talpey.com \
    --cc=yieli@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

all inboxes | Powered by JetHome®