]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Introduce an FRMR recovery workqueue
authorChuck Lever <chuck.lever@oracle.com>
Tue, 25 Aug 2015 18:41:50 +0000 (12:41 -0600)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:45:56 +0000 (14:45 -0600)
commit5470258f9fe3dfeb0e2536e0574b5e7d0644220a
treef4ccac49a54527a008876c100c094929347b2002
parent8c735e9e35068d9f04571e25782393aee4220107
xprtrdma: Introduce an FRMR recovery workqueue

[ Upstream commit 951e721ca0d665ece6175b8d8edf93cf7b215bd5 ]

After a transport disconnect, FRMRs can be left in an undetermined
state. In particular, the MR's rkey is no good.

Currently, FRMRs are fixed up by the transport connect worker, but
that can race with ->ro_unmap if an RPC happens to exit while the
transport connect worker is running.

A better way of dealing with broken FRMRs is to detect them before
they are re-used by ->ro_map. Such FRMRs are either already invalid
or are owned by the sending RPC, and thus no race with ->ro_unmap
is possible.

Introduce a mechanism for handing broken FRMRs to a workqueue to be
reset in a context that is appropriate for allocating resources
(ie. an ib_alloc_fast_reg_mr() API call).

This mechanism is not yet used, but will be in subsequent patches.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com>
Tested-By: Devesh Sharma <devesh.sharma@avagotech.com>
Reviewed-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/xprt_rdma.h