Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3435856rdh; Mon, 27 Nov 2023 14:26:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCms66W0KQDyCELsKULGRQXcf5lq0oU6UrlD0stbIR9CO/Mf2z1uAIgan2xnR15i+oAWsB X-Received: by 2002:a05:622a:1a0e:b0:418:fab:2d31 with SMTP id f14-20020a05622a1a0e00b004180fab2d31mr14885049qtb.4.1701123986597; Mon, 27 Nov 2023 14:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701123986; cv=none; d=google.com; s=arc-20160816; b=qzNjTrmeXrIAt8IMzJbbL3Zmx7tWNyo7+WMOihp4787B+rXGopy0pxnfEgdaBjZkxF 1ktmIclg7o8HjLkURsVc3sTPoBn6sXj2uCRb3Xd2SPm3POvuwyKE5oP99KvWV1eNNHni SR+ckyecidPe2W+MA83C5fKA4ogCYH2ksu/Tw5+dH7IMFn8b4CSopMtq0PFm4488BRFM kaUnrV/LiiqgfGYNn3+q0hFHDrfnprstCA1Df1V1ReFzmHzkCvZ5Rgyp2K7MHU4kB/Yb thOD0vMn3FzIgUu5q74SxxUYuqZz1MfMU1efagali6mo/OWHCxxgcoKT/GkW9PSHtNtR 4KgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=RXHR+iFkNdk8OOqg7ZpMKPqXb0ziWcVCp/LPoi0m+2w=; fh=jJKqF/JD6JWuD74Uks+PTnMRtM7vaEBfWmzyGfT69fo=; b=XA0Raf3z7TBLCZ7LYx7h6EpYJX3FMg6p/tZ9x6tEMnfCgaL7zLdBxCCLTy3tXohsRc TGE10ZaL6iSvhXzGr9DTBYa+ltjyHsawuqCmCUEyV05KEo3lOgUice4KMcZ7zEIgCGL9 4Nr/CUHjfewlBaw08fZfsrFQQBXhCV4C/OrwqXB9oAxNkEkH+HT/OHlNZ+2M6xfgYYzo uzbM9EUukMzornT6DGSb52Nf8qfgZRqp7tZgqBYdFpRNOvtWejhNP52MUzl73DpKauQe YAQk0tC0WQa8WIo+L82AfrxU/QuNpqCMMwDM6/+6/fS3S1CLZhuGvXxOcVu3djs9B1BP hTaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=fh8FgCi5; spf=pass (google.com: domain of linux-nfs+bounces-112-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-112-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q17-20020a05622a04d100b004236f52ea2bsi9756910qtx.321.2023.11.27.14.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 14:26:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-112-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=fh8FgCi5; spf=pass (google.com: domain of linux-nfs+bounces-112-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-112-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 484741C20937 for ; Mon, 27 Nov 2023 22:26:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BE064596F; Mon, 27 Nov 2023 22:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=umich.edu header.i=@umich.edu header.b="fh8FgCi5" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75527D4B for ; Mon, 27 Nov 2023 14:26:20 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c9ace45341so320481fa.0 for ; Mon, 27 Nov 2023 14:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; t=1701123979; x=1701728779; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RXHR+iFkNdk8OOqg7ZpMKPqXb0ziWcVCp/LPoi0m+2w=; b=fh8FgCi5FVDmDsfiqDYGmMWLDObMlk6LgCrBuzGo9z1oA1rf2TyXHZx5/KAC8RJYlB NdDHwnmXhslagi+spnR7TNxRuBO7xQCvwLeuoOJuyODiGmfA0wVDw9TNgfssHyluIef2 k7MML+HyatwUz7QrHTymNQMLfBrc0Ckf8wyIDfvGe77XFQSxcRbslxtbrBt+DIs/MG3t xt2qi9iQW3IkxXpwvWLRAbS0xIK7z5zHyaB32o/cEjK7/X+NtvUw7lkvfZ4ZazfbwyhI LpDDIhYKBXnwjlhGBYG6uWdAR9s+2+BtbCBp4TZ/mY83UNsOHEq7a9XY8QOz6CUGCcrV 6awQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701123979; x=1701728779; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RXHR+iFkNdk8OOqg7ZpMKPqXb0ziWcVCp/LPoi0m+2w=; b=sgeeq2M6qk/3euEHwiqHs210fbWcnpRmIj+33Q/T7y/wy0tvOwsRD1/gYrO9OSl0y+ G6RvipiYt7/n6i477JAbqreiuezTjalc1IpG2o7CJRddEI1wdLtL62hT22wWx8J/Xvsy Pc3zyXKkMZ09pYgjabNJvXWgVsf8G3VDSxbQw9unLDDijLrmYjqvHrl34e8GCYbyHkcs Z6xCIYxx5DI3MZ9DL0lE2Npe2blW8JuDMQ5pTqIo4aaLFPnl1BpeEZlN+Dejbw8WBSEF xRbkZeRKZpjCol2l64774RhXNFt+MoYLEbXrFkIoQrmtHn9OtuzV/7R9cQUo0jzRTXKY UV7w== X-Gm-Message-State: AOJu0YzqegIzbvOXmJuVKofpBSNON7gzhE6Ernn7vSXtHEVn/tXMUBCn jAGFWYUamZki1EH+0DjEk5s9nT2PYYctajomluA= X-Received: by 2002:a2e:5404:0:b0:2c8:38b2:2c33 with SMTP id i4-20020a2e5404000000b002c838b22c33mr7637023ljb.3.1701123978531; Mon, 27 Nov 2023 14:26:18 -0800 (PST) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231127153959.2067-1-thfeathers@sina.cn> <170112068218.7109.1172633879607916557@noble.neil.brown.name> In-Reply-To: <170112068218.7109.1172633879607916557@noble.neil.brown.name> From: Olga Kornievskaia Date: Mon, 27 Nov 2023 12:26:06 -1000 Message-ID: Subject: Re: [PATCH] SUNRPC: _xprt_switch_find_current_entry return xprt with condition find_active To: NeilBrown Cc: Trond Myklebust , "jlayton@kernel.org" , "thfeathers@sina.cn" , "chuck.lever@oracle.com" , "tom@talpey.com" , "Dai.Ngo@oracle.com" , "kolga@netapp.com" , "linux-nfs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2023 at 11:31=E2=80=AFAM NeilBrown wrote: > > On Tue, 28 Nov 2023, Trond Myklebust wrote: > > On Mon, 2023-11-27 at 23:39 +0800, jsq wrote: > > > [You don't often get email from thfeathers@sina.cn. Learn why this is > > > important at https://aka.ms/LearnAboutSenderIdentification ] > > > > > > current function always return a active xprt or NULL no matter what > > > find_active > > > > > > This patch clearly breaks xprt_switch_find_current_entry_offline(). > > I think it actually fixes xprt_switch_find_current_entry_offline(). > > Looking closely at _xprt_switch_find_current_entry: > > if (found && ((find_active && xprt_is_active(pos)) || > (!find_active && xprt_is_active(pos)))) > > and comparing with similar code in xprt_switch_find_next_entry: > > if (found && ((check_active && xprt_is_active(pos)) || > (!check_active && !xprt_is_active(pos)))) > > There is a difference in the number of '!'. I suspect the former is > wrong. > If the former is correct, then "find_active" is irrelevant. Thanks Neil for pointing it out. We need the "find_active", otherwise as Trond pointed out it breaks the offline function. But I do believe I missed the "!" in the logic. I believe the reason this hasn't caused problems is because for the offline transports we never use the xprt_iter_xprt(). We only iterate thru the get_next when we iterate offline transports. But I should fix the function that adds the "!". > > NeilBrown > > > Furthermore, we do not accept patches without a real name on a Signed- > > off-by: line. > > > > So NACK on two accounts. > > > > -- > > Trond Myklebust > > Linux NFS client maintainer, Hammerspace > > trond.myklebust@hammerspace.com > > > > > > > >