Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2777262pxb; Mon, 19 Apr 2021 13:44:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx57qsQEZUOR84e+5gU8KDm87Yw61W4sDqv2/K0gCYalIhSSJVtii78h6Bn36d/Rh4LGH/v X-Received: by 2002:a65:43c9:: with SMTP id n9mr13492618pgp.19.1618865086930; Mon, 19 Apr 2021 13:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618865086; cv=none; d=google.com; s=arc-20160816; b=AkK8JK7h/jXk1kqzhlmlBNd6Xhjewa3wEp+wB8oNZwIlfwOe9Jf3fBPZv111UElEtU kq2Sq2dkPNizDOP9grSqQzfpe/qB53kcIXZh2qVVL5CnQqDKPVZ4YIjbpKFyI1SIlk5e ed4ep0RJqglsPdKms3syg/dgS/8U2arRpeuLVc7cZyr3E83IlCKh6totEYz0fDWmycxA +Dk36jBEp67moJKt4We8uL+NLocKFErcinDdUJOntNhakTFNXo+Sg1q6k3vtXjL2IHAI 913HDRnEE+oubW12GHl0pW7LE2eNfpJyff4ay0MbbPlGSaeKoTpGxazo2cIbC/Ga1N+H b4VQ== 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=GUExjA4Sdzdg/G9tW7z2EZ7NPB+geD3fB3c5b7/AUdA=; b=Looho9NF0DVN23pJx2jXMQZ04Mku4npPS5sENm302CU1XFQHxQdKpgrRs7VZE1CKAT 2eQmol7BfoUFDTbnBk+hSEctgN4RRcAGJLwdKlILqfsk6XcExHJ4nb2YeK3lLlyUbha0 WB2SlL2BQdBe991xAijWdFijtvJXmTd9frQGeK0ZdPr7ZexotQ9T/LdlfXjzA0zW7v/i kU51WG7GuDtYwvF1L69HSU+UnyS7/CZ6roDn7osr+r9+Da91cq6InGex4CvKR9kXwXTT SMDkLtMFcS4SQlcYvtd5DGaHnmUuoBOdUhfOYLWkfoLZc0RJnvDnn8EfxvhD8l886vKX 3+ow== 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 u18si18250216pfi.215.2021.04.19.13.44.27; Mon, 19 Apr 2021 13:44:46 -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 S240506AbhDSSDB (ORCPT + 99 others); Mon, 19 Apr 2021 14:03:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:40978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240433AbhDSSDA (ORCPT ); Mon, 19 Apr 2021 14:03:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2CF561001; Mon, 19 Apr 2021 18:02:29 +0000 (UTC) Subject: [PATCH v3 08/26] xprtrdma: Improve commentary around rpcrdma_reps_unmap() From: Chuck Lever To: trondmy@hammerspace.com Cc: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Date: Mon, 19 Apr 2021 14:02:28 -0400 Message-ID: <161885534885.38598.10229325712635490142.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 Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/verbs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 482fdc9e25c2..f3482fd67ec2 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -1041,6 +1041,10 @@ static void rpcrdma_rep_put(struct rpcrdma_buffer *buf, llist_add(&rep->rr_node, &buf->rb_free_reps); } +/* Caller must ensure the QP is quiescent (RQ is drained) before + * invoking this function, to guarantee rb_all_reps is not + * changing. + */ static void rpcrdma_reps_unmap(struct rpcrdma_xprt *r_xprt) { struct rpcrdma_buffer *buf = &r_xprt->rx_buf; @@ -1048,7 +1052,7 @@ static void rpcrdma_reps_unmap(struct rpcrdma_xprt *r_xprt) list_for_each_entry(rep, &buf->rb_all_reps, rr_all) { rpcrdma_regbuf_dma_unmap(rep->rr_rdmabuf); - rep->rr_temp = true; + rep->rr_temp = true; /* Mark this rep for destruction */ } }