• Chuck Lever's avatar
    xprtrdma: Simplify RPC wake-ups on connect · 31e62d25
    Chuck Lever authored
    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>
    31e62d25
verbs.c 38.9 KB