linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
Date: Tue, 13 Sep 2022 16:42:09 -0400	[thread overview]
Message-ID: <CAFX2JfmzD6JkrAiqMUCzJknnBwPiN5Ftd8WnysF6Qgeajcto6Q@mail.gmail.com> (raw)
In-Reply-To: <DE16B82B-67D9-49BA-B797-AC21AC8E7CE4@oracle.com>

On Tue, Sep 13, 2022 at 4:12 PM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Sep 13, 2022, at 11:01 AM, Anna Schumaker <anna@kernel.org> wrote:
> >
> > From: Anna Schumaker <Anna.Schumaker@Netapp.com>
> >
> > This was discussed with Chuck as part of this patch set. Returning
> > nfserr_resource was decided to not be the best error message here, and
> > he suggested changing to nfserr_serverfault instead.
> >
> > Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
> > ---
> > fs/nfsd/nfs4xdr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I've applied this one for nfsd for-next. Thanks!
>
> As I mentioned, 2/2 looks OK, and I'll apply it to my private
> tree for testing while we work out why it's a little slower.
>
>
> > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> > index 1e9690a061ec..01dd73ed5720 100644
> > --- a/fs/nfsd/nfs4xdr.c
> > +++ b/fs/nfsd/nfs4xdr.c
> > @@ -3994,7 +3994,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
> >       }
> >       if (resp->xdr->buf->page_len && splice_ok) {
> >               WARN_ON_ONCE(1);
> > -             return nfserr_resource;
> > +             return nfserr_serverfault;
>
> Odd, I couldn't find a definition for nfserr_serverfault when
> I asked for this patch last week, but this one-liner seems to
> compile correctly. Oh well!

I found it in fs/nfsd/nfsd.h with `git grep`: #define
nfserr_serverfault      cpu_to_be32(NFSERR_SERVERFAULT)

Anna

>
>
> >       }
> >       xdr_commit_encode(xdr);
> >
> > --
> > 2.37.3
> >
>
> --
> Chuck Lever
>
>
>

  reply	other threads:[~2022-09-13 20:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 18:01 [PATCH v4 0/2] NFSD: Simplify READ_PLUS Anna Schumaker
2022-09-13 18:01 ` [PATCH v4 1/2] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Anna Schumaker
2022-09-13 20:12   ` Chuck Lever III
2022-09-13 20:42     ` Anna Schumaker [this message]
2022-09-15 19:59   ` Jeff Layton
2022-09-16  2:17     ` Chuck Lever III
2022-10-06 16:35   ` Jeff Layton
2022-09-13 18:01 ` [PATCH v4 2/2] NFSD: Simplify READ_PLUS Anna Schumaker
2022-10-06 16:35   ` Jeff Layton
2022-09-13 18:45 ` [PATCH v4 0/2] " Chuck Lever III
2022-09-13 20:45   ` Anna Schumaker
2022-10-05 15:10     ` Anna Schumaker
2022-10-05 15:53       ` Chuck Lever III
2022-10-31 17:55         ` Anna Schumaker
2022-10-31 18:00           ` 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=CAFX2JfmzD6JkrAiqMUCzJknnBwPiN5Ftd8WnysF6Qgeajcto6Q@mail.gmail.com \
    --to=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.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;
as well as URLs for NNTP newsgroup(s).