Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp680117pxb; Tue, 5 Apr 2022 18:30:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL+yzvplNTWs4eYfNyMny7+SXLH0KjwkcFuvyxoDDW2+UVTTVgbmmdBGUPo08Nb2QSQOoS X-Received: by 2002:a17:903:281:b0:14c:f3b3:209b with SMTP id j1-20020a170903028100b0014cf3b3209bmr6190178plr.87.1649208609758; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208609; cv=none; d=google.com; s=arc-20160816; b=l7xIsCNqQW1kldxw9VS/3r61E41/Q3xH8slLokQnwdd+pqHY2EGtdszi02idkN/TMP 24Ksr37FoWSv+/N8vCXVKiu4cLEFMdpTqXTgEZOULor09D3yEcPLIJMbLPik920Gpc0K r6A6bzaoyMfCfEWuaCOVZkdb8ZhlAA7NWjJTjSM4VZdt/qw5455kuhg6pT8gEEN4jJ7i 8stHrNnq/3p48ioERZDuziMEhbI5j7/ZAXSgnL7fYh7ffZNAfx9qigd5IXyMV57M2vMk M3DhIQADrXWaMZ5WAYvmkuDSI/54kLX3KRSXfJv/AtL72WLwMlRJjLSNbVWhriAdPYIw THzA== 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:subject:cc:to :from:dkim-signature; bh=eIcMJlnDatYgsSw8WpHlxL9OUyTuLYE+YTEcQRiuGpc=; b=BL9VUpZk9bZM41VpYnHmvCh1/qI9E2Il1vZts2uATfqi2S3IZgcKTQA5r87deFwlBj D/BPsd7R6JDQsmClNjfrFaa4KDq6mQECHA92JVw51Qmc8GkV37qzu7ruLujFeZUH64V5 HHLhYyLEMo1Ifc5pxoeFvRVTRSMv1F6HHlR37sJuHiY0Z3Q5UBo6oRidPSFafwP5pcP3 2RtteI3+Kdx0QyPfNZ5fXmdGnJQTwm/UJOp4t8R4gnlEs5mAEcluB51CdyaK9MnVLqy8 SnnWNSCnhbWWKBZ7VclQyRsaPKfP1gLePm+0g0DVSD5Fcm8nGcunQWaILIw0VzNTnp46 CwpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yDLQK+rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a1709028a8f00b001560318de2csi12860691plo.318.2022.04.05.18.29.54; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=yDLQK+rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380892AbiDENOS (ORCPT + 99 others); Tue, 5 Apr 2022 09:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344224AbiDEJSu (ORCPT ); Tue, 5 Apr 2022 05:18:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A5948E4E; Tue, 5 Apr 2022 02:05:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BAE04B81C19; Tue, 5 Apr 2022 09:05:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2881EC385A5; Tue, 5 Apr 2022 09:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149549; bh=hVMP6vT6nk2Fvww8pqkV4ggGVroKNxjj41ODBDf1TYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yDLQK+rKUguf4TiYw6mi6c0GZXnZZfrwEeTZPXEbOoDxF9uEwe7PXx/HVrvg5P2Gl qqayoV5fHpIAWkG6JleizICq5pUzOXO4jvmNuBGRSDDTa6g7puOf2MF3kcB5uiAYYO oe/mTQ845Sfdm0MhZMzdH0uF1mm6XxEip26fRAKA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Olga Kornievskaia , Trond Myklebust , Sasha Levin Subject: [PATCH 5.16 0718/1017] SUNRPC dont resend a task on an offlined transport Date: Tue, 5 Apr 2022 09:27:11 +0200 Message-Id: <20220405070415.581082002@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org From: Olga Kornievskaia [ Upstream commit 82ee41b85cef16b4be1f4732650012d9baaedddd ] When a task is being retried, due to an NFS error, if the assigned transport has been put offline and the task is relocatable pick a new transport. Fixes: 6f081693e7b2b ("sunrpc: remove an offlined xprt using sysfs") Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5985b78eddf1..b36d235d2d6d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1065,7 +1065,9 @@ rpc_task_get_next_xprt(struct rpc_clnt *clnt) static void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt) { - if (task->tk_xprt) + if (task->tk_xprt && + !(test_bit(XPRT_OFFLINE, &task->tk_xprt->state) && + (task->tk_flags & RPC_TASK_MOVEABLE))) return; if (task->tk_flags & RPC_TASK_NO_ROUND_ROBIN) task->tk_xprt = rpc_task_get_first_xprt(clnt); -- 2.34.1