diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-04-23 16:49:54 -0500 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-05-19 07:33:43 -0500 |
commit | 0e7f011a19696cc25d68a8d6631fc6c5aa60a54c (patch) | |
tree | 2d87c078c835a3629cb0e053bd92911d019878b9 /net/sunrpc/xprtrdma/svc_rdma_sendto.c | |
parent | aa3314c8d6da673b3454549eed45547a79f7cbe1 (diff) | |
download | kernel_samsung_tuna-0e7f011a19696cc25d68a8d6631fc6c5aa60a54c.zip kernel_samsung_tuna-0e7f011a19696cc25d68a8d6631fc6c5aa60a54c.tar.gz kernel_samsung_tuna-0e7f011a19696cc25d68a8d6631fc6c5aa60a54c.tar.bz2 |
svcrdma: Simplify receive buffer posting
The svcrdma transport provider currently allocates receive buffers
to the RQ through the xpo_release_rqst method. This approach is overly
complicated since it means that the rqstp rq_xprt_ctxt has to be
selectively set based on whether the RPC is going to be processed
immediately or deferred. Instead, just post the receive buffer when
we are certain that we are replying in the send_reply function.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_sendto.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 981f190..f61d7bd 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -389,6 +389,16 @@ static int send_reply(struct svcxprt_rdma *rdma, int page_no; int ret; + /* Post a recv buffer to handle another request. */ + ret = svc_rdma_post_recv(rdma); + if (ret) { + printk(KERN_INFO + "svcrdma: could not post a receive buffer, err=%d." + "Closing transport %p.\n", ret, rdma); + set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags); + return 0; + } + /* Prepare the context */ ctxt->pages[0] = page; ctxt->count = 1; |