]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xprtrdma: Disable completions for FAST_REG_MR Work Requests
authorChuck Lever <chuck.lever@oracle.com>
Tue, 29 Jul 2014 21:25:12 +0000 (17:25 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 31 Jul 2014 20:22:56 +0000 (16:22 -0400)
Instead of relying on a completion to change the state of an FRMR
to FRMR_IS_VALID, set it in advance. If an error occurs, a completion
will fire anyway and mark the FRMR FRMR_IS_STALE.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Steve Wise <swise@opengridcomputing.com>
Tested-by: Shirley Ma <shirley.ma@oracle.com>
Tested-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c

index 7459b867d7d6b81bb6f518f7ee8a1fcdaf7aaf0a..3e8b3881548d9e70d683524fc7a53c81143382de 100644 (file)
@@ -159,10 +159,7 @@ rpcrdma_sendcq_process_wc(struct ib_wc *wc)
                return;
        }
 
-       if (wc->opcode == IB_WC_FAST_REG_MR)
-               frmr->r.frmr.fr_state = FRMR_IS_VALID;
-       else if (wc->opcode == IB_WC_LOCAL_INV)
-               frmr->r.frmr.fr_state = FRMR_IS_INVALID;
+       frmr->r.frmr.fr_state = FRMR_IS_INVALID;
 }
 
 static int
@@ -1727,10 +1724,11 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
        dprintk("RPC:       %s: Using frmr %p to map %d segments\n",
                __func__, mw, i);
 
+       frmr->fr_state = FRMR_IS_VALID;
+
        memset(&frmr_wr, 0, sizeof frmr_wr);
        frmr_wr.wr_id = (unsigned long)(void *)mw;
        frmr_wr.opcode = IB_WR_FAST_REG_MR;
-       frmr_wr.send_flags = IB_SEND_SIGNALED;
        frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma;
        frmr_wr.wr.fast_reg.page_list = frmr->fr_pgl;
        frmr_wr.wr.fast_reg.page_list_len = page_no;
@@ -1766,6 +1764,7 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
        *nsegs = i;
        return 0;
 out_err:
+       frmr->fr_state = FRMR_IS_INVALID;
        while (i--)
                rpcrdma_unmap_one(ia, --seg);
        return rc;