]> asedeno.scripts.mit.edu Git - linux.git/commit
xprtrdma: Simplify RPC wake-ups on connect
authorChuck Lever <chuck.lever@oracle.com>
Mon, 1 Oct 2018 18:26:08 +0000 (14:26 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 3 Oct 2018 12:58:41 +0000 (08:58 -0400)
commit31e62d25b5b8155b2ff6a7c6d31256475dbbcc7a
treeb98fcd4d3f7b9831df26a79f48e19e265e6172d2
parent316a616e7886583c03d00f8320458b713c1dd277
xprtrdma: Simplify RPC wake-ups on connect

Currently, when a connection is established, rpcrdma_conn_upcall
invokes rpcrdma_conn_func and then
wake_up_all(&ep->rep_connect_wait). The former wakes waiting RPCs,
but the connect worker is not done yet, and that leads to races,
double wakes, and difficulty understanding how this logic is
supposed to work.

Instead, collect all the "connection established" logic in the
connect worker (xprt_rdma_connect_worker). A disconnect worker is
retained to handle provider upcalls safely.

Fixes: 254f91e2fa1f ("xprtrdma: RPC/RDMA must invoke ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h