linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
@ 2016-02-15 15:23 Chuck Lever
  2016-02-17 15:16 ` Anna Schumaker
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2016-02-15 15:23 UTC (permalink / raw)
  To: anna.schumaker; +Cc: linux-nfs

Some NFSv4.1 OPEN requests were hanging waiting for the NFS server
to finish recalling delegations. Turns out that each NFSv4.1 CB
request on RDMA gets a GARBAGE_ARGS reply from the Linux client.

Commit 756b9b37cfb2e3dc added a line in bc_svc_process that
overwrites the incoming rq_rcv_buf's length with the value in
rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke
xprt_complete_bc_request(), thus rq_private_buf.len is not
initialized. svc_process_common() is invoked with a zero-length
RPC message, and fails.

Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel')
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Hi Anna-

Commit 756b9b37cfb2e3dc in v4.5-rc1 introduced a behavior
regression for NFSv4.1-over-RDMA. Would it be possible to merge
this bug fix into 4.5-rc ?


 net/sunrpc/xprtrdma/backchannel.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
index cc1251d..2dcd764 100644
--- a/net/sunrpc/xprtrdma/backchannel.c
+++ b/net/sunrpc/xprtrdma/backchannel.c
@@ -341,6 +341,8 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
 	rqst->rq_reply_bytes_recvd = 0;
 	rqst->rq_bytes_sent = 0;
 	rqst->rq_xid = headerp->rm_xid;
+
+	rqst->rq_private_buf.len = size;
 	set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state);
 
 	buf = &rqst->rq_rcv_buf;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
  2016-02-15 15:23 [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len Chuck Lever
@ 2016-02-17 15:16 ` Anna Schumaker
  2016-02-17 15:19   ` Chuck Lever
  0 siblings, 1 reply; 4+ messages in thread
From: Anna Schumaker @ 2016-02-17 15:16 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

Hi Chuck,

On 02/15/2016 10:23 AM, Chuck Lever wrote:
> Some NFSv4.1 OPEN requests were hanging waiting for the NFS server
> to finish recalling delegations. Turns out that each NFSv4.1 CB
> request on RDMA gets a GARBAGE_ARGS reply from the Linux client.
> 
> Commit 756b9b37cfb2e3dc added a line in bc_svc_process that
> overwrites the incoming rq_rcv_buf's length with the value in
> rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke
> xprt_complete_bc_request(), thus rq_private_buf.len is not
> initialized. svc_process_common() is invoked with a zero-length
> RPC message, and fails.
> 
> Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel')
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> Hi Anna-
> 
> Commit 756b9b37cfb2e3dc in v4.5-rc1 introduced a behavior
> regression for NFSv4.1-over-RDMA. Would it be possible to merge
> this bug fix into 4.5-rc ?
> 
> 
>  net/sunrpc/xprtrdma/backchannel.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
> index cc1251d..2dcd764 100644
> --- a/net/sunrpc/xprtrdma/backchannel.c
> +++ b/net/sunrpc/xprtrdma/backchannel.c
> @@ -341,6 +341,8 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
>  	rqst->rq_reply_bytes_recvd = 0;
>  	rqst->rq_bytes_sent = 0;
>  	rqst->rq_xid = headerp->rm_xid;
> +

nit: Any reason for the extra newline?

> +	rqst->rq_private_buf.len = size;

This patch looks okay to me, and I'll make sure it's included in the next rc pull request Trond sends.

Thanks,
Anna

>  	set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state);
>  
>  	buf = &rqst->rq_rcv_buf;
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
  2016-02-17 15:16 ` Anna Schumaker
@ 2016-02-17 15:19   ` Chuck Lever
  2016-02-17 15:25     ` Anna Schumaker
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2016-02-17 15:19 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: Linux NFS Mailing List


> On Feb 17, 2016, at 10:16 AM, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
> 
> Hi Chuck,
> 
> On 02/15/2016 10:23 AM, Chuck Lever wrote:
>> Some NFSv4.1 OPEN requests were hanging waiting for the NFS server
>> to finish recalling delegations. Turns out that each NFSv4.1 CB
>> request on RDMA gets a GARBAGE_ARGS reply from the Linux client.
>> 
>> Commit 756b9b37cfb2e3dc added a line in bc_svc_process that
>> overwrites the incoming rq_rcv_buf's length with the value in
>> rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke
>> xprt_complete_bc_request(), thus rq_private_buf.len is not
>> initialized. svc_process_common() is invoked with a zero-length
>> RPC message, and fails.
>> 
>> Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel')
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>> Hi Anna-
>> 
>> Commit 756b9b37cfb2e3dc in v4.5-rc1 introduced a behavior
>> regression for NFSv4.1-over-RDMA. Would it be possible to merge
>> this bug fix into 4.5-rc ?
>> 
>> 
>> net/sunrpc/xprtrdma/backchannel.c |    2 ++
>> 1 file changed, 2 insertions(+)
>> 
>> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
>> index cc1251d..2dcd764 100644
>> --- a/net/sunrpc/xprtrdma/backchannel.c
>> +++ b/net/sunrpc/xprtrdma/backchannel.c
>> @@ -341,6 +341,8 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
>> 	rqst->rq_reply_bytes_recvd = 0;
>> 	rqst->rq_bytes_sent = 0;
>> 	rqst->rq_xid = headerp->rm_xid;
>> +
> 
> nit: Any reason for the extra newline?

Yes: xprt_complete_bc_request sets the private buffer length
and sets RPC_BC_PA_IN_USE. So I want to group these two
lines in their own paragraph just to "document" that they
belong together and are not related to the lines above
them.


>> +	rqst->rq_private_buf.len = size;
> 
> This patch looks okay to me, and I'll make sure it's included in the next rc pull request Trond sends.

Thanks!


> Thanks,
> Anna
> 
>> 	set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state);
>> 
>> 	buf = &rqst->rq_rcv_buf;

--
Chuck Lever





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
  2016-02-17 15:19   ` Chuck Lever
@ 2016-02-17 15:25     ` Anna Schumaker
  0 siblings, 0 replies; 4+ messages in thread
From: Anna Schumaker @ 2016-02-17 15:25 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Linux NFS Mailing List

On 02/17/2016 10:19 AM, Chuck Lever wrote:
> 
>> On Feb 17, 2016, at 10:16 AM, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
>>
>> Hi Chuck,
>>
>> On 02/15/2016 10:23 AM, Chuck Lever wrote:
>>> Some NFSv4.1 OPEN requests were hanging waiting for the NFS server
>>> to finish recalling delegations. Turns out that each NFSv4.1 CB
>>> request on RDMA gets a GARBAGE_ARGS reply from the Linux client.
>>>
>>> Commit 756b9b37cfb2e3dc added a line in bc_svc_process that
>>> overwrites the incoming rq_rcv_buf's length with the value in
>>> rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke
>>> xprt_complete_bc_request(), thus rq_private_buf.len is not
>>> initialized. svc_process_common() is invoked with a zero-length
>>> RPC message, and fails.
>>>
>>> Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel')
>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>> ---
>>> Hi Anna-
>>>
>>> Commit 756b9b37cfb2e3dc in v4.5-rc1 introduced a behavior
>>> regression for NFSv4.1-over-RDMA. Would it be possible to merge
>>> this bug fix into 4.5-rc ?
>>>
>>>
>>> net/sunrpc/xprtrdma/backchannel.c |    2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
>>> index cc1251d..2dcd764 100644
>>> --- a/net/sunrpc/xprtrdma/backchannel.c
>>> +++ b/net/sunrpc/xprtrdma/backchannel.c
>>> @@ -341,6 +341,8 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
>>> 	rqst->rq_reply_bytes_recvd = 0;
>>> 	rqst->rq_bytes_sent = 0;
>>> 	rqst->rq_xid = headerp->rm_xid;
>>> +
>>
>> nit: Any reason for the extra newline?
> 
> Yes: xprt_complete_bc_request sets the private buffer length
> and sets RPC_BC_PA_IN_USE. So I want to group these two
> lines in their own paragraph just to "document" that they
> belong together and are not related to the lines above
> them.

Makes sense.  Thanks!

Anna

> 
> 
>>> +	rqst->rq_private_buf.len = size;
>>
>> This patch looks okay to me, and I'll make sure it's included in the next rc pull request Trond sends.
> 
> Thanks!
> 
> 
>> Thanks,
>> Anna
>>
>>> 	set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state);
>>>
>>> 	buf = &rqst->rq_rcv_buf;
> 
> --
> Chuck Lever
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-17 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 15:23 [PATCH] xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len Chuck Lever
2016-02-17 15:16 ` Anna Schumaker
2016-02-17 15:19   ` Chuck Lever
2016-02-17 15:25     ` Anna Schumaker

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).