]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Wait before destroying transport's queue pair
authorChuck Lever <chuck.lever@oracle.com>
Tue, 21 Apr 2015 22:27:39 +0000 (18:27 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:46:00 +0000 (14:46 -0600)
commitf941adcd9ce5157b89557ae08e3225c2ad73eb8f
treecd551baf643752c8fae3de6ac3e383c2518db0ef
parent143fb1314a00738929cc8887ac10a519430a62c8
xprtrdma: Wait before destroying transport's queue pair

[ Proposed for upstream v4.4 ]

Ensure that resources needed to handle completions remain in place
until all pending completions have been processed.

This solution is based on commit 7dad6b2e440d ("IB/srp: Fix a race
condition triggered by destroying a queue pair").

Note that when shutting down a transport, destroying the receive
buffers must be done _after_ the receive buffers are flushed.

Also note that during a transport reconnect, any waiting RPC can
exit (eg soft timeout). With FRWR, that can result in a posted send
WR after the sentinel. That will be addressed eventually. Right now
there are no dependencies on this (mis)behavior.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h