• Chuck Lever's avatar
    xprtrdma: Don't defer fencing an async RPC's chunks · 8f66b1a5
    Chuck Lever authored
    In current kernels, waiting in xprt_release appears to be safe to
    do. I had erroneously believed that for ASYNC RPCs, waiting of any
    kind in xprt_release->xprt_rdma_free would result in deadlock. I've
    done injection testing and consulted with Trond to confirm that
    waiting in the RPC release path is safe.
    
    For the very few times where RPC resources haven't yet been released
    earlier by the reply handler, it is safe to wait synchronously in
    xprt_rdma_free for invalidation rather than defering it to MR
    recovery.
    
    Note: When the QP is error state, posting a LocalInvalidate should
    flush and mark the MR as bad. There is no way the remote HCA can
    access that MR via a QP in error state, so it is effectively already
    inaccessible and thus safe for the Upper Layer to access. The next
    time the MR is used it should be recognized and cleaned up properly
    by frwr_op_map.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    8f66b1a5
transport.c 24.8 KB