Skip to content

Commit

Permalink
xprtrdma: Use ro_unmap_sync in xprt_rdma_send_request
Browse files Browse the repository at this point in the history
The "safe" version of ro_unmap is used here to avoid waiting
unnecessarily. However:

 - It is safe to wait. After all, we have to wait anyway when using
   FMR to register memory.

 - This case is rare: it occurs only after a reconnect.

By switching this call site to ro_unmap_sync, the final use of
ro_unmap_safe is removed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Chuck Lever authored and Anna Schumaker committed Oct 16, 2017
1 parent 8f66b1a commit 4ce6c04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sunrpc/xprtrdma/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,8 @@ xprt_rdma_send_request(struct rpc_task *task)

/* 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);
r_xprt->rx_ia.ri_ops->ro_unmap_sync(r_xprt,
&req->rl_registered);

rc = rpcrdma_marshal_req(r_xprt, rqst);
if (rc < 0)
Expand Down

0 comments on commit 4ce6c04

Please sign in to comment.