[PATCH] xprtrdma: Use generic asynchronous MR disposal in send_request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clean up: The asynchronous path of ro_unmap_safe is the same for all
registration modes, so just move it into the only function that
calls it.

"Safe" disposal is done because attempting to invalidate an MR with
a memory key from the previous connection epoch can result in a
memory management operation error for some registration modes, and
that will kill the current connection.

Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
---
 net/sunrpc/xprtrdma/transport.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Hi Anna-

This patch replaces 2/3 in the for-4.15 series I sent a few days
ago.

diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 8cf5ccf..aa5cab2 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -727,8 +727,12 @@
 		goto drop_connection;
 
 	/* On retransmit, remove any previously registered chunks */
-	if (unlikely(!list_empty(&req->rl_registered)))
-		r_xprt->rx_ia.ri_ops->ro_unmap_safe(r_xprt, req, false);
+	while (unlikely(!list_empty(&req->rl_registered))) {
+		struct rpcrdma_mw *mw;
+
+		mw = rpcrdma_pop_mw(&req->rl_registered);
+		rpcrdma_defer_mr_recovery(mw);
+	}
 
 	rc = rpcrdma_marshal_req(r_xprt, rqst);
 	if (rc < 0)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux