diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-02-10 17:18:39 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-02-11 20:01:20 +0100 |
commit | 2ea24497a1b30dd03dd42b873fa5097913587f4d (patch) | |
tree | 1e1b3d1c95e712dcce68be4d011620b46a6271c7 /include | |
parent | SUNRPC: Fix potential memory scribble in xprt_free_bc_request() (diff) | |
download | linux-2ea24497a1b30dd03dd42b873fa5097913587f4d.tar.xz linux-2ea24497a1b30dd03dd42b873fa5097913587f4d.zip |
SUNRPC: RPC callbacks may be split across several TCP segments
Since TCP is a stream protocol, our callback read code needs to take into
account the fact that RPC callbacks are not always confined to a single
TCP segment.
This patch adds support for multiple TCP segments by ensuring that we
only remove the rpc_rqst structure from the 'free backchannel requests'
list once the data has been completely received. We rely on the fact
that TCP data is ordered for the duration of the connection.
Reported-by: shaobingqing <shaobingqing@bwstor.com.cn>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/bc_xprt.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 969c0a671dbf..2ca67b55e0fe 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h @@ -32,7 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <linux/sunrpc/sched.h> #ifdef CONFIG_SUNRPC_BACKCHANNEL -struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); +struct rpc_rqst *xprt_lookup_bc_request(struct rpc_xprt *xprt, __be32 xid); +void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied); void xprt_free_bc_request(struct rpc_rqst *req); int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); |