Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2777379pxb; Mon, 19 Apr 2021 13:44:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKD3OEwV5qthFKSzPPGf1DVmdUi6rm/onnIHpSJQ7kTQ805td/aGTbj95FC5r+oyzHF//0 X-Received: by 2002:a17:902:a5c1:b029:ec:b031:750b with SMTP id t1-20020a170902a5c1b02900ecb031750bmr3309769plq.85.1618865096185; Mon, 19 Apr 2021 13:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618865096; cv=none; d=google.com; s=arc-20160816; b=jmlG1+MVD7rWDEUBrZPVKoa4PgwHktHyP/BQuu6h/SNNtxvhpK2c1AkAI1O9HkshoM a1kymJBxM0OmNl+WW68uTn9pUU1nRsheUX6+VSefnDO8XRVoQFrPVqrofGqLUjFUI93a PvdnvdOedLSmA1zjMve/sqMRNjYuMMkOSCNpGn1Ex1F5MGBTmQNjLh+e6KDXn9Tl3H1f ZKsTUQyU0asp49T4ZiM6mFVrR0Tfa+WKjGAKYCUEhL8MVIpXYa6tft0wbjKNXnJUN6LW Xoo8SOMAdadvFp9eOn9e5j0fTeCMURSlQ2h2JmXRrDd2mHjjgZS9N27+zSVIHqaXfC+e xFuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject; bh=54a17ca7WPcWzMn5D0v/5Y9VV/7G3p3OxdWnvROMLOE=; b=s7zCMs8iFOKYnze06UavUsNJEpgnYZI1e/pa3AkVrDD32FIMzysOKzqHpA3CVy6hK+ eI98EMIw6fAa9R40VqJ4bgdOHYEhUTYzAujbxSXe9sfPzSZa6a9NpJD8LNE0WKrSfEBF fQBBZSB3yWTHdrChwPjLZOGzS3TQ6YL5zKDMuz7FtAKG5ZlzldgD80LPJW3Ol9pnvbEP t68sNVYI4jj1W5ZhIYTh7ONIl0SXDlxVrVCnHfg6NbqJhtw7C5GupEH0QUKJQJG7EjK+ GnYLltLhFMV7fKmzsPRYXb/HqFwrKGlEIvYHpeuWOSgDOI3gyQuzdXp563U8r1Uaqi17 0RoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si8086169pfu.201.2021.04.19.13.44.42; Mon, 19 Apr 2021 13:44:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240612AbhDSSEk (ORCPT + 99 others); Mon, 19 Apr 2021 14:04:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240024AbhDSSEk (ORCPT ); Mon, 19 Apr 2021 14:04:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 282A461001; Mon, 19 Apr 2021 18:04:10 +0000 (UTC) Subject: [PATCH v3 24/26] xprtrdma: Move fr_linv_done field to struct rpcrdma_mr From: Chuck Lever To: trondmy@hammerspace.com Cc: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Date: Mon, 19 Apr 2021 14:04:09 -0400 Message-ID: <161885544938.38598.9359292599994562265.stgit@manet.1015granger.net> In-Reply-To: <161885481568.38598.16682844600209775665.stgit@manet.1015granger.net> References: <161885481568.38598.16682844600209775665.stgit@manet.1015granger.net> User-Agent: StGit/0.23-29-ga622f1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Clean up: Move more of struct rpcrdma_frwr into its parent. Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/frwr_ops.c | 9 ++++----- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index 2a886a28d82b..7d7a64d2ca4a 100644 --- a/net/sunrpc/xprtrdma/frwr_ops.c +++ b/net/sunrpc/xprtrdma/frwr_ops.c @@ -142,7 +142,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr *mr) mr->frwr.fr_mr = frmr; mr->mr_device = NULL; INIT_LIST_HEAD(&mr->mr_list); - init_completion(&mr->frwr.fr_linv_done); + init_completion(&mr->mr_linv_done); frwr_cid_init(ep, mr); sg_init_table(sg, depth); @@ -481,12 +481,11 @@ static void frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc) { struct ib_cqe *cqe = wc->wr_cqe; struct rpcrdma_mr *mr = container_of(cqe, struct rpcrdma_mr, mr_cqe); - struct rpcrdma_frwr *frwr = &mr->frwr; /* WARNING: Only wr_cqe and status are reliable at this point */ trace_xprtrdma_wc_li_wake(wc, &mr->mr_cid); frwr_mr_done(wc, mr); - complete(&frwr->fr_linv_done); + complete(&mr->mr_linv_done); rpcrdma_flush_disconnect(cq->cq_context, wc); } @@ -544,7 +543,7 @@ void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req) * are complete. */ last->wr_cqe->done = frwr_wc_localinv_wake; - reinit_completion(&frwr->fr_linv_done); + reinit_completion(&mr->mr_linv_done); /* Transport disconnect drains the receive CQ before it * replaces the QP. The RPC reply handler won't call us @@ -558,7 +557,7 @@ void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req) * not happen, so don't wait in that case. */ if (bad_wr != first) - wait_for_completion(&frwr->fr_linv_done); + wait_for_completion(&mr->mr_linv_done); if (!rc) return; diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h index f72b69c3f0ea..1374054b73fd 100644 --- a/net/sunrpc/xprtrdma/xprt_rdma.h +++ b/net/sunrpc/xprtrdma/xprt_rdma.h @@ -231,7 +231,6 @@ struct rpcrdma_sendctx { */ struct rpcrdma_frwr { struct ib_mr *fr_mr; - struct completion fr_linv_done; union { struct ib_reg_wr fr_regwr; struct ib_send_wr fr_invwr; @@ -247,6 +246,7 @@ struct rpcrdma_mr { int mr_nents; enum dma_data_direction mr_dir; struct ib_cqe mr_cqe; + struct completion mr_linv_done; struct rpcrdma_frwr frwr; struct rpcrdma_xprt *mr_xprt; u32 mr_handle;