public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/3] SUNRPC: Fix large reads on NFS/RDMA
Date: Tue, 21 Jan 2014 15:17:44 -0500	[thread overview]
Message-ID: <20140121151744.7ab2c696@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140117193816.3452.45059.stgit@manet.1015granger.net>

On Fri, 17 Jan 2014 14:38:16 -0500
Chuck Lever <chuck.lever@oracle.com> wrote:

> After commit a11a2bf4, "SUNRPC: Optimise away unnecessary data
> moves in xdr_align_pages", Thu Aug 2 13:21:43 2012, READs larger
> than a few hundred bytes via NFS/RDMA stopped working.  This
> commit exposed a long-standing bug in rpcrdma_inline_fixup().
> 
> I reproduce this with an rsize=4096 mount using the cthon04
> basic tests.  Test 5 fails with an EIO error.
> 
> For my reproducer, kernel log shows:
> 
>   NFS: server cheating in read reply: count 4096 > recvd 0
> 
> rpcrdma_inline_fixup() is zeroing the xdr_stream::page_len
> field, and xdr_align_pages() is now returning that value to
> the READ XDR decoder function.
> 
> That field is set up by xdr_inline_pages() by the READ XDR
> encoder function.  As far as I can tell, it is supposed to
> be left alone after that, as it describes the dimensions of
> the reply xdr_stream, not the contents of that stream.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68391
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: <stable@vger.kernel.org> # 3.7+
> ---
> 
>  net/sunrpc/xprtrdma/rpc_rdma.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
> index e03725b..96ead52 100644
> --- a/net/sunrpc/xprtrdma/rpc_rdma.c
> +++ b/net/sunrpc/xprtrdma/rpc_rdma.c
> @@ -649,9 +649,7 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
>  				break;
>  			page_base = 0;
>  		}
> -		rqst->rq_rcv_buf.page_len = olen - copy_len;
> -	} else
> -		rqst->rq_rcv_buf.page_len = 0;
> +	}
>  
>  	if (copy_len && rqst->rq_rcv_buf.tail[0].iov_len) {
>  		curlen = copy_len;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Seems to fix the bug for me too...

Tested-by: Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2014-01-21 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 19:37 [PATCH 0/3] NFS/RDMA bug fixes Chuck Lever
2014-01-17 19:38 ` [PATCH 1/3] NFS: Fix READDIR oops with NFSv4 on RDMA Chuck Lever
2014-01-17 19:38 ` [PATCH 2/3] SUNRPC: Fix large reads on NFS/RDMA Chuck Lever
2014-01-21 20:17   ` Jeff Layton [this message]
2014-01-17 19:38 ` [PATCH 3/3] SUNRPC: remove KERN_INFO from dprintk() call sites Chuck Lever
2014-01-21 20:18   ` Jeff Layton
     [not found] ` <CABgxfbFbLKV98GavS0x_X_ZXw0hZXPEQCpfoJJi+uNp133qt2w@mail.gmail.com>
2014-01-24 18:34   ` [PATCH 0/3] NFS/RDMA bug fixes Chuck Lever
     [not found]     ` <CABgxfbEcKbeFMS=yobqp9TeHn4aa-Kjvi_tfbLK2xRbmFtmk9A@mail.gmail.com>
2014-01-24 21:50       ` Chuck Lever

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=20140121151744.7ab2c696@tlielax.poochiereds.net \
    --to=jlayton@redhat.com \
    --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