• Chuck Lever's avatar
    xprtrdma: Reset FRMRs when FAST_REG_MR is flushed by a disconnect · 9f9d802a
    Chuck Lever authored
    FAST_REG_MR Work Requests update a Memory Region's rkey. Rkey's are
    used to block unwanted access to the memory controlled by an MR. The
    rkey is passed to the receiver (the NFS server, in our case), and is
    also used by xprtrdma to invalidate the MR when the RPC is complete.
    
    When a FAST_REG_MR Work Request is flushed after a transport
    disconnect, xprtrdma cannot tell whether the WR actually hit the
    adapter or not. So it is indeterminant at that point whether the
    existing rkey is still valid.
    
    After the transport connection is re-established, the next
    FAST_REG_MR or LOCAL_INV Work Request against that MR can sometimes
    fail because the rkey value does not match what xprtrdma expects.
    
    The only reliable way to recover in this case is to deregister and
    register the MR before it is used again. These operations can be
    done only in a process context, so handle it in the transport
    connect worker.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Tested-by: default avatarSteve Wise <swise@opengridcomputing.com>
    Tested-by: default avatarShirley Ma <shirley.ma@oracle.com>
    Tested-by: default avatarDevesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    9f9d802a
verbs.c 50.4 KB