Commit 4d4b0a1e authored by Chuck Lever's avatar Chuck Lever Committed by Xie XiuQi
Browse files

xprtrdma: Simplify RPC wake-ups on connect



mainline inclusion
from mainline-4.20
commit 31e62d25
category: bugfix
bugzilla: NA
CVE: NA

-------------------------------------------------

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: 254f91e2 ("xprtrdma: RPC/RDMA must invoke ... ")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>

Conflicts:
  net/sunrpc/xprtrdma/transport.c
  net/sunrpc/xprtrdma/verbs.c
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 133376e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment