提交 b1e1e158 编写于 作者: T Tom Talpey 提交者: Trond Myklebust

SVCRDMA: remove faulty assertions in rpc/rdma chunk validation.

Certain client-provided RPCRDMA chunk alignments result in an
additional scatter/gather entry, which triggered nfs/rdma server
assertions incorrectly. OpenSolaris nfs/rdma client connectathon
testing was blocked by these in the special/locking section.
Signed-off-by: NTom Talpey <tmtalpey@gmail.com>
Cc: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 e1ebfd33
...@@ -191,7 +191,6 @@ static int map_xdr(struct svcxprt_rdma *xprt, ...@@ -191,7 +191,6 @@ static int map_xdr(struct svcxprt_rdma *xprt,
struct xdr_buf *xdr, struct xdr_buf *xdr,
struct svc_rdma_req_map *vec) struct svc_rdma_req_map *vec)
{ {
int sge_max = (xdr->len+PAGE_SIZE-1) / PAGE_SIZE + 3;
int sge_no; int sge_no;
u32 sge_bytes; u32 sge_bytes;
u32 page_bytes; u32 page_bytes;
...@@ -235,7 +234,11 @@ static int map_xdr(struct svcxprt_rdma *xprt, ...@@ -235,7 +234,11 @@ static int map_xdr(struct svcxprt_rdma *xprt,
sge_no++; sge_no++;
} }
BUG_ON(sge_no > sge_max); dprintk("svcrdma: map_xdr: sge_no %d page_no %d "
"page_base %zd page_len %zd head_len %d tail_len %d\n",
sge_no, page_no, xdr->page_base, xdr->page_len,
xdr->head[0].iov_len, xdr->tail[0].iov_len);
vec->count = sge_no; vec->count = sge_no;
return 0; return 0;
} }
...@@ -579,7 +582,6 @@ static int send_reply(struct svcxprt_rdma *rdma, ...@@ -579,7 +582,6 @@ static int send_reply(struct svcxprt_rdma *rdma,
ctxt->sge[page_no+1].length = 0; ctxt->sge[page_no+1].length = 0;
} }
BUG_ON(sge_no > rdma->sc_max_sge); BUG_ON(sge_no > rdma->sc_max_sge);
BUG_ON(sge_no > ctxt->count);
memset(&send_wr, 0, sizeof send_wr); memset(&send_wr, 0, sizeof send_wr);
ctxt->wr_op = IB_WR_SEND; ctxt->wr_op = IB_WR_SEND;
send_wr.wr_id = (unsigned long)ctxt; send_wr.wr_id = (unsigned long)ctxt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册