summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtrdma/rpc_rdma.c
diff options
context:
space:
mode:
authorTom Tucker <tom@ogc.us>2010-08-11 12:47:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-08-11 12:47:24 -0400
commit15cdc644b268a9a9ce73ce0b153129222c254b7b (patch)
treeaca119f733a5c0823ed4b294c3eef4a222d55b7c /net/sunrpc/xprtrdma/rpc_rdma.c
parent7a8b80eb38b248cfdf84048dad12073d5cfba3e6 (diff)
rpcrdma: Fix SQ size calculation when memreg is FRMR
This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ. Signed-off-by: Tom Tucker <tom@ogc.us> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/rpc_rdma.c')
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index e5e28d1946a4..2ac3f6e8adff 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
req->rl_nchunks = nchunks;
BUG_ON(nchunks == 0);
+ BUG_ON((r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_FRMR)
+ && (nchunks > 3));
/*
* finish off header. If write, marshal discrim and nchunks.