Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2925281rwb; Mon, 15 Aug 2022 14:10:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PIWRJ7PuKUGmvgEU99eqM/zQbVrdKSj5zlYjm7Houi/jiZ6X4PhuwM8nVIJ2iG3OYl9Rg X-Received: by 2002:a17:907:168e:b0:731:4ba0:d5e9 with SMTP id hc14-20020a170907168e00b007314ba0d5e9mr11792232ejc.204.1660597815777; Mon, 15 Aug 2022 14:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597815; cv=none; d=google.com; s=arc-20160816; b=w+YfTp9sTaYqBY/P+/oktaYWAhnsTzoXFa0f/pVBaa8Y0pw76tzecEppl5ClJMQdfs sW6wqEyfLfbk6iBJmqaIfDRD9OwWXfO6lnb02N5gFL2MzN8Falm1gJiFnR93gUxwUhCe nb+aBskSbx/OzmKU8Wyv3IMmEVDb/37b5M6e18/lufrrzqiWrkR7IMqc+koG88UxrIGs A7aDJJ5xKRX+zKegVeItCPWHmkG7/vqHrZ1DDE6QVDJOYiXaR+vk3udzp3RG2kHl7b12 BUxYBWw7qfseYdfRcLOEiuzM4B1qEUksZDJ2v7bWoQFLghwAUMuoQR2U2JqgQsdbGIQq AGtw== 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=QpmViiUqBy9D91xb4R0xCne83P1EJpqKf9A0mUOXtKk=; b=QtBytgPgJW98dWND8MlJWsuX+wfxa4/Mi3gJ4re2t7Vr3tcfEe6+VTBzkQnSO2CCaQ JoVcMrjgZZzqkkjCm9DoTr2p7EX/KHG1YHv+7AGiTIKPgbwzztjlc/oHtc2JyYHd23vU Bq9ZhDjUzywm6H80K4CpN6ctrcV/UJArzaIg0wb3A+jG96iLOBIbPVh/ADbnFvy5O/yf 8HsY/r4Qba8KTXBx3uZIsSLZJbMgJAitqVOYpSY+fhPHERaslYt0i34qyJZWYsMzw2nw hCT3A4bYu/aUoQk1J9o2LswYE+MVlkhZBkX3MKfW7aYZK5NARLHAD2g6W6iLxZsDATqy JedQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kWc0s1yu; 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 hw19-20020a170907a0d300b0073121897f6esi2473593ejc.222.2022.08.15.14.09.49; Mon, 15 Aug 2022 14:10:15 -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=kWc0s1yu; 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 S1345940AbiHOUJI (ORCPT + 99 others); Mon, 15 Aug 2022 16:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240602AbiHOUIf (ORCPT ); Mon, 15 Aug 2022 16:08:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7510C481DE; Mon, 15 Aug 2022 11:55:31 -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 85008B810A0; Mon, 15 Aug 2022 18:55:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFDD1C433C1; Mon, 15 Aug 2022 18:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589728; bh=ROX/1QPSrkWehly//Z9ez2AbVEnBFV5ns4JBLQV7t80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kWc0s1yua8+4Hda6KKCExzIzpCUFhmThZ/sQB7qvkz7K9hVe9jdrLexBbq5YB+syq c9vN9TZFN6AiWBmOHb+aJh0qMvB6nWlprrbI30+h3RVAlyLEmr1Qbi9DY2AkO1YhMR lerZqfBzS+oJ3ibamLPoHxOk/cDMftvIMBfaMRT8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 5.18 0005/1095] pNFS/flexfiles: Report RDMA connection errors to the server Date: Mon, 15 Aug 2022 19:50:04 +0200 Message-Id: <20220815180429.511045249@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 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: Trond Myklebust commit 7836d75467e9d214bdf5c693b32721de729a6e38 upstream. The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors under certain circumstances. Make sure that we handle them and report them to the server. If not, we can end up cycling forever in a LAYOUTGET/LAYOUTRETURN loop. Fixes: a12f996d3413 ("NFSv4/pNFS: Use connections to a DS that are all of the same protocol family") Cc: stable@vger.kernel.org # 5.11.x Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1131,6 +1131,8 @@ static int ff_layout_async_handle_error_ case -EIO: case -ETIMEDOUT: case -EPIPE: + case -EPROTO: + case -ENODEV: dprintk("%s DS connection error %d\n", __func__, task->tk_status); nfs4_delete_deviceid(devid->ld, devid->nfs_client, @@ -1236,6 +1238,8 @@ static void ff_layout_io_track_ds_error( case -ENOBUFS: case -EPIPE: case -EPERM: + case -EPROTO: + case -ENODEV: *op_status = status = NFS4ERR_NXIO; break; case -EACCES: