Linux NFS development
 help / color / mirror / Atom feed
From: Tom Tucker <tom@opengridcomputing.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH  3/17] svcrdma: Fix return value in svc_rdma_send
Date: Mon, 05 May 2008 21:03:02 -0500	[thread overview]
Message-ID: <C4452686.4957E%tom@opengridcomputing.com> (raw)
In-Reply-To: <20080505220817.GH12814@fieldses.org>



On 5/5/08 5:08 PM, "J. Bruce Fields" <bfields@fieldses.org> wrote:

> On Fri, May 02, 2008 at 11:28:35AM -0500, Tom Tucker wrote:
>> Fix the return value on close to -ENOTCONN so caller knows to free context.
>> Also if a thread is waiting for free SQ space, check for close when waking
>> to avoid posting WR to a closing transport.
> 
> A random related question: svc_rdma_send_error() seems to have only one
> caller, which ignores its return value.  Should its return value be
> made void?

Honestly, I don't think this code path has ever been excercised. This is the
"protocol error" path. Given my experience with the "random transport error"
tests that resulted in the patchset your currently looking at, I'd be
inclined to defer this kind of thing until I've built a "protocol error" set
of tests and worked through the "evil client" scenarios.

Thoughts?
> 
> --b.
> 
>> 
>> Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
>> 
>> ---
>>  net/sunrpc/xprtrdma/svc_rdma_transport.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c
>> b/net/sunrpc/xprtrdma/svc_rdma_transport.c
>> index 14f83a1..8adb2f0 100644
>> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
>> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
>> @@ -999,7 +999,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct
>> ib_send_wr *wr)
>> int ret;
>>  
>> if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags))
>> -  return 0;
>> +  return -ENOTCONN;
>>  
>> BUG_ON(wr->send_flags != IB_SEND_SIGNALED);
>> BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op !=
> --
> 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



  reply	other threads:[~2008-05-06  2:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1209745721600-git-send-email-tom@opengridcomputing.com>
2008-05-02 22:37 ` [PATCH 0/17] svcrdma: RDMA transport driver close path cleanup J. Bruce Fields
2008-05-02 23:05   ` Tom Tucker
     [not found] ` <12097457211326-git-send-email-tom@opengridcomputing.com>
     [not found]   ` <1209745721248-git-send-email-tom@opengridcomputing.com>
     [not found]     ` <12097457213375-git-send-email-tom@opengridcomputing.com>
2008-05-05 19:31       ` [PATCH 1/17] svcrdma: Simplify receive buffer posting J. Bruce Fields
     [not found]       ` <12097457212336-git-send-email-tom@opengridcomputing.com>
     [not found]         ` <12097457212951-git-send-email-tom@opengridcomputing.com>
     [not found]           ` <12097457211122-git-send-email-tom@opengridcomputing.com>
     [not found]             ` <12097457223433-git-send-email-tom@opengridcomputing.com>
     [not found]               ` <12097457223971-git-send-email-tom@opengridcomputing.com>
     [not found]                 ` <12097457223635-git-send-email-tom@opengridcomputing.com>
     [not found]                   ` <12097457223351-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:06                     ` [PATCH 2/17] svcrdma: Fix race with dto_tasklet in svc_rdma_send J. Bruce Fields
2008-05-06  2:26                       ` Tom Tucker
2008-05-06 21:18                         ` J. Bruce Fields
2008-05-07  0:45                           ` Tom Tucker
     [not found]                     ` <12097457221640-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:08                       ` [PATCH 3/17] svcrdma: Fix return value " J. Bruce Fields
2008-05-06  2:03                         ` Tom Tucker [this message]
2008-05-06 21:08                           ` J. Bruce Fields
     [not found]                       ` <120974572253-git-send-email-tom@opengridcomputing.com>
     [not found]                         ` <12097457223519-git-send-email-tom@opengridcomputing.com>
     [not found]                           ` <12097457223927-git-send-email-tom@opengridcomputing.com>
     [not found]                             ` <12097457232986-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:41                               ` [PATCH 7/17] svcrdma: Fix error handling during listening endpoint creation J. Bruce Fields
2008-05-06 14:48                                 ` Tom Tucker
2008-05-06 21:22                                   ` J. Bruce Fields
2008-05-07  0:48                                     ` Tom Tucker
2008-05-07  1:30                                       ` J. Bruce Fields
     [not found]                               ` <12097457231736-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:52                                 ` [PATCH 8/17] svcrdma: Return error from rdma_read_xdr so caller knows to free context J. Bruce Fields
2008-05-06  2:05                                   ` Tom Tucker
2008-05-06 21:32     ` [PATCH 11/17] svcrdma: Use standard Linux lists for context cache J. Bruce Fields
2008-05-07  0:49       ` Tom Tucker
2008-05-06 21:46 ` [PATCH 0/17] svcrdma: RDMA transport driver close path cleanup J. Bruce Fields

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=C4452686.4957E%tom@opengridcomputing.com \
    --to=tom@opengridcomputing.com \
    --cc=bfields@fieldses.org \
    --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