mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
xprtrdma: Remap Receive buffers after a reconnect
[ Upstream commit895cedc179
] On server-initiated disconnect, rpcrdma_xprt_disconnect() was DMA- unmapping the Receive buffers, but rpcrdma_post_recvs() neglected to remap them after a new connection had been established. The result was immediate failure of the new connection with the Receives flushing with LOCAL_PROT_ERR. Fixes:671c450b6f
("xprtrdma: Fix oops in Receive handler after device removal") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3d3d1ecdd7
commit
b5257c1ec7
1 changed files with 4 additions and 5 deletions
|
@ -962,9 +962,6 @@ struct rpcrdma_rep *rpcrdma_rep_create(struct rpcrdma_xprt *r_xprt,
|
||||||
if (!rep->rr_rdmabuf)
|
if (!rep->rr_rdmabuf)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf))
|
|
||||||
goto out_free_regbuf;
|
|
||||||
|
|
||||||
rep->rr_cid.ci_completion_id =
|
rep->rr_cid.ci_completion_id =
|
||||||
atomic_inc_return(&r_xprt->rx_ep->re_completion_ids);
|
atomic_inc_return(&r_xprt->rx_ep->re_completion_ids);
|
||||||
|
|
||||||
|
@ -983,8 +980,6 @@ struct rpcrdma_rep *rpcrdma_rep_create(struct rpcrdma_xprt *r_xprt,
|
||||||
spin_unlock(&buf->rb_lock);
|
spin_unlock(&buf->rb_lock);
|
||||||
return rep;
|
return rep;
|
||||||
|
|
||||||
out_free_regbuf:
|
|
||||||
rpcrdma_regbuf_free(rep->rr_rdmabuf);
|
|
||||||
out_free:
|
out_free:
|
||||||
kfree(rep);
|
kfree(rep);
|
||||||
out:
|
out:
|
||||||
|
@ -1391,6 +1386,10 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed, bool temp)
|
||||||
rep = rpcrdma_rep_create(r_xprt, temp);
|
rep = rpcrdma_rep_create(r_xprt, temp);
|
||||||
if (!rep)
|
if (!rep)
|
||||||
break;
|
break;
|
||||||
|
if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) {
|
||||||
|
rpcrdma_rep_put(buf, rep);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
rep->rr_cid.ci_queue_id = ep->re_attr.recv_cq->res.id;
|
rep->rr_cid.ci_queue_id = ep->re_attr.recv_cq->res.id;
|
||||||
trace_xprtrdma_post_recv(rep);
|
trace_xprtrdma_post_recv(rep);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue