Skip to content

Commit 6e9fab7

Browse files
committed
svcrdma: Remove save_io_pages() call from send_error_msg()
Commit 4757d90 ("svcrdma: Report Write/Reply chunk overruns") made an effort to preserve I/O pages until RDMA Write completion. In a subsequent patch, I intend to de-duplicate the two functions that send ERR_CHUNK responses. Pull the save_io_pages() call out of svc_rdma_send_error_msg() to make it more like svc_rdma_send_error(). Signed-off-by: Chuck Lever <[email protected]>
1 parent e814eec commit 6e9fab7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

net/sunrpc/xprtrdma/svc_rdma_sendto.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,7 @@ static int svc_rdma_send_reply_msg(struct svcxprt_rdma *rdma,
806806

807807
/* Given the client-provided Write and Reply chunks, the server was not
808808
* able to form a complete reply. Return an RDMA_ERROR message so the
809-
* client can retire this RPC transaction. As above, the Send completion
810-
* routine releases payload pages that were part of a previous RDMA Write.
809+
* client can retire this RPC transaction.
811810
*
812811
* Remote Invalidation is skipped for simplicity.
813812
*/
@@ -834,8 +833,6 @@ static int svc_rdma_send_error_msg(struct svcxprt_rdma *rdma,
834833
*p = err_chunk;
835834
trace_svcrdma_err_chunk(*rdma_argp);
836835

837-
svc_rdma_save_io_pages(rqstp, ctxt);
838-
839836
ctxt->sc_send_wr.num_sge = 1;
840837
ctxt->sc_send_wr.opcode = IB_WR_SEND;
841838
ctxt->sc_sges[0].length = ctxt->sc_hdrbuf.len;
@@ -930,6 +927,10 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
930927
if (ret != -E2BIG && ret != -EINVAL)
931928
goto err1;
932929

930+
/* Send completion releases payload pages that were part
931+
* of previously posted RDMA Writes.
932+
*/
933+
svc_rdma_save_io_pages(rqstp, sctxt);
933934
ret = svc_rdma_send_error_msg(rdma, sctxt, rqstp);
934935
if (ret < 0)
935936
goto err1;

0 commit comments

Comments
 (0)