Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2975132iog; Mon, 20 Jun 2022 08:35:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v0lvKOBrbtR9aukn1uw0rusM83CHHfhlJvG1a+o1plZT4jCnvdKXQiKOxKirSDLrPh8jlN X-Received: by 2002:a17:907:c26:b0:711:ca03:ab3c with SMTP id ga38-20020a1709070c2600b00711ca03ab3cmr22134737ejc.654.1655739315405; Mon, 20 Jun 2022 08:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655739315; cv=none; d=google.com; s=arc-20160816; b=ZoCDKs34E5M5fW9LD35gpstni7Yqne8kIVJuMYEecqO50tfmWXaFTBm+3vzirtxlEO mDePv+CCAGWDXfIsTD+bxFHxymv0rHi9sZhr3bzXRtjF4O4l6+SAKogTIaH2xtlgunJX jp7wQ7sqwHkRlcW44jgmXpgDA+qwqjbsuJIy5iXyivv9KbbhKCkFtdVOVDzOF4rRvc19 MNYGL6bzFOkL/dqJkFDSjBBHKKJF2BgQQkUvsd3lJtJjHRGU0GItv6dCPY8MPV5W14wC QwQoJlB8Fljbrn2uII0b9c2Vx+swFe1JKApO7eKmdudlQR3LgVpiGcIaeDGX/7/Bg7o0 G5KQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/HmcZzdxdf4F8eA9MR87GKLepSrbSvTKoPRKJ2aJz3E=; b=HZyw0bsnjBrTv9tBpIOaE0sOkTOayyW6xGbRdKJTZtQw5V8HdNT3kXCx5TxAOdNZYZ D0rsB46FrO7jtnpoXE8977trqeNePw57Ci/EauYJyccGrEkjrsDZ0bOfbSDqeuPrgpWQ +H8QoS8G+iECl88UugVFIIShzgaAgDEQLV+PHHDMTp0VoezrHHQQgr1E6BDqc9zWi1Us CvRod2zK5w1ErSc9n99StYxB1DVUwN0c5ogtdi4/HgvN7XNW43dnf2+NMPkfIypJTinV ++XDLZefVQJbsCQ3CAPyrmCYFlLClBxfKIkzQLxPOCMT9fgt7iOgoq+HRlhyyze+F+oP OAsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HO86txAg; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa13-20020a1709076d0d00b00712ae69fac3si14486291ejc.878.2022.06.20.08.34.49; Mon, 20 Jun 2022 08:35:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HO86txAg; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244792AbiFTP0D (ORCPT + 99 others); Mon, 20 Jun 2022 11:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244822AbiFTPZZ (ORCPT ); Mon, 20 Jun 2022 11:25:25 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E019DE3 for ; Mon, 20 Jun 2022 08:24:41 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id n197so8032403qke.1 for ; Mon, 20 Jun 2022 08:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/HmcZzdxdf4F8eA9MR87GKLepSrbSvTKoPRKJ2aJz3E=; b=HO86txAgLpdZQ+QNDLpvPdwTrsUcgkz0C9JewG+MvSwJteluw8ggBS/Q34kugZZbI3 0+cRfOmLy3aWXR8FDpSxHg1aYentMXeWcIpBX0RKFHwzXLWJhKa8lbqMtXuATMheP1Pb kv54K3MLJeFLwgK61Ba8TME9PZuR70ZA1Rc1+CbvJMjgDixp1v2R63ivD1/fyoieqGqQ 0e8liATwyEZtmnElct/FGtKG8nE0/CGB6pIltLoUclhJkuVM80HGXbWz2a+9HUcAHuGc 4MD3BniWuI4HPMrZL+xZ8o+YUEJBLmlGX0HeJyUdlk3NrQrtTvJufm4bvuPFlwZ5h/hP gEmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/HmcZzdxdf4F8eA9MR87GKLepSrbSvTKoPRKJ2aJz3E=; b=JsoJdPJzqICn2/LcjEGyaictWYtBWDUg1snlMHe0HYH9K7riDHSAXyV3VXjZtshxky dLzKvp/uTo2ggVE0dPy/rWS7hLJvqcXM7GZX4DCV4I9R9dXRI+Eeofxd0Bq1oEwHHeVU Z0+Mt1GO+iLqm2nHXkhphjtRNUse9vC8+CP03jxg312opVb6CcdOAUQz8yW2p8yZ/PrL 7nVwAw28enJMgGUarmTsBIo1Q6jrUYB6r+ocLqs07sNetic4FsiIx0CHuxHhuhhB4Oin RhJGnaRPNDgfLBw2Mi3IshSR31i5KRY3X6trBN0uozPMqgbgfFlq8pdTH9/ZFEgWTOWe 2nnA== X-Gm-Message-State: AJIora9LFicp7aRZlFvgXiRnx4+qjSolHvWSFtaBRL2oOb731MTswjnO BvOACm2takM1MCmuSDFvsHpn0hKVl7fmSg== X-Received: by 2002:a37:ef02:0:b0:6ac:470a:cf96 with SMTP id j2-20020a37ef02000000b006ac470acf96mr7071006qkk.763.1655738680368; Mon, 20 Jun 2022 08:24:40 -0700 (PDT) Received: from kolga-mac-1.attlocal.net ([2600:1700:6a10:2e90:48cb:6eb8:1da1:a5c0]) by smtp.gmail.com with ESMTPSA id g10-20020a05620a40ca00b006a791a42693sm12517862qko.133.2022.06.20.08.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 08:24:39 -0700 (PDT) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH v1 08/12] NFSv4.1 remove xprt from xprt_switch if session trunking test fails Date: Mon, 20 Jun 2022 11:24:03 -0400 Message-Id: <20220620152407.63127-9-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20220620152407.63127-1-olga.kornievskaia@gmail.com> References: <20220620152407.63127-1-olga.kornievskaia@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Olga Kornievskaia If we are doing a session trunking test and it fails for the transport, then remove this transport from the xprt_switch group. Signed-off-by: Olga Kornievskaia --- fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5e4c32924347..152da2bc5100 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -8917,6 +8917,9 @@ void nfs4_test_session_trunk(struct rpc_clnt *clnt, struct rpc_xprt *xprt, if (status == 0) rpc_clnt_xprt_switch_add_xprt(clnt, xprt); + else if (rpc_clnt_xprt_switch_has_addr(clnt, + (struct sockaddr *)&xprt->addr)) + rpc_clnt_xprt_switch_remove_xprt(clnt, xprt); rpc_put_task(task); } -- 2.27.0