• Chuck Lever's avatar
    xprtrdma: Fix rpcrdma_reqs_reset() · acd9f2dd
    Chuck Lever authored
    Avoid FastReg operations getting MW_BIND_ERR after a reconnect.
    
    rpcrdma_reqs_reset() is called on transport tear-down to get each
    rpcrdma_req back into a clean state.
    
    MRs on req->rl_registered are waiting for a FastReg, are already
    registered, or are waiting for invalidation. If the transport is
    being torn down when reqs_reset() is called, the matching LocalInv
    might never be posted. That leaves these MR registered /and/ on
    req->rl_free_mrs, where they can be re-used for the next
    connection.
    
    Since xprtrdma does not keep specific track of the MR state, it's
    not possible to know what state these MRs are in, so the only safe
    thing to do is release them immediately.
    
    Fixes: 5de55ce9 ("xprtrdma: Release in-flight MRs on disconnect")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    acd9f2dd
verbs.c 36.1 KB