linux/net/sunrpc/xprtrdma
Chuck Lever 0c0829bcf5 xprtrdma: Don't wake pending tasks until disconnect is done
Transport disconnect processing does a "wake pending tasks" at
various points.

Suppose an RPC Reply is being processed. The RPC task that Reply
goes with is waiting on the pending queue. If a disconnect wake-up
happens before reply processing is done, that reply, even if it is
good, is thrown away, and the RPC has to be sent again.

This window apparently does not exist for socket transports because
there is a lock held while a reply is being received which prevents
the wake-up call until after reply processing is done.

To resolve this, all RPC replies being processed on an RPC-over-RDMA
transport have to complete before pending tasks are awoken due to a
transport disconnect.

Callers that already hold the transport write lock may invoke
->ops->close directly. Others use a generic helper that schedules
a close when the write lock can be taken safely.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2019-01-02 12:05:16 -05:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
backchannel.c xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00
fmr_ops.c xprtrdma: Name MR trace events consistently 2018-10-02 15:55:36 -04:00
frwr_ops.c xprtrdma: Ensure MRs are DMA-unmapped when posting LOCAL_INV fails 2019-01-02 12:05:16 -05:00
module.c NFS client updates for Linux 4.18 2018-06-12 10:09:03 -07:00
rpc_rdma.c xprtrdma: Replace rpcrdma_receive_wq with a per-xprt workqueue 2019-01-02 12:05:16 -05:00
svc_rdma.c sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data' 2018-08-09 16:11:21 -04:00
svc_rdma_backchannel.c xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00
svc_rdma_recvfrom.c A mistake on my part caused me to tag my branch 6 commits too early, 2018-08-23 16:00:10 -07:00
svc_rdma_rw.c A mistake on my part caused me to tag my branch 6 commits too early, 2018-08-23 16:00:10 -07:00
svc_rdma_sendto.c A mistake on my part caused me to tag my branch 6 commits too early, 2018-08-23 16:00:10 -07:00
svc_rdma_transport.c svcrdma: Reduce max_send_sges 2018-10-29 16:58:04 -04:00
transport.c xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00
verbs.c xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00
xprt_rdma.h xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00