]> git.baikalelectronics.ru Git - kernel.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)
commit9261f98172dbc406934865de3180d003c76b181c
treeb98fcd4d3f7b9831df26a79f48e19e265e6172d2
parente71e40bf36f5e81dacdc1a29e609e46a2fcd0ec2
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: 58c3cde8f7fc ("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