Re: [PATCH v4 1/2] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Sep 13, 2022, at 11:01 AM, Anna Schumaker <anna@xxxxxxxxxx> wrote:
> 
> From: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
> 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!


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

--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux