Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6143242iog; Thu, 23 Jun 2022 12:14:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u/GGCxgd9faOnbWvwVWL+ZEve1xpZMxMbpgQCXYh3Wqwz6rOt9OgiMR/raY0D8ClUu944F X-Received: by 2002:a63:5304:0:b0:3fb:92eb:8e90 with SMTP id h4-20020a635304000000b003fb92eb8e90mr8778355pgb.36.1656011676926; Thu, 23 Jun 2022 12:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011676; cv=none; d=google.com; s=arc-20160816; b=L+1wcdUQ0zki3a/GLhRHd5IyQg2YbXk2pwbmPxBbUcj+Z01C7RPoOcVatOGQMYerSl S7Q5WP8vcOhbQ7F316IFBc1XEQZlBuD5aKDkUAH1RBCvTq9aHAWjKEtFKTxDdROlM8Dr ElMkg9fT4I+UfUv5zS/docqSpok0F51VQRkrJvW9hlvYRMZ8xeu0s7n/uFoRbdENX99P wqzFgZFhva1iBK/ya98y7thTEaV26pLbT9oXza+hpObXV22EZyfRmR8R6cRp9ODYNnGe T8WpjmijpIdx6FvWvQjTOrULSKynzD058KwXfAVcM4nG2THSIxyaJEJfplBZIJGeFA2H tbmw== 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=hydjUmTspKYcOcaymbSNKB9w47oCrf6CpWQ8d8QU0FM=; b=pJhaV2tih3cOXhyru6gbazCvVlBdyOKWrsi7p3IcRJW3XM20ZUipyYg3CMhLcj974e 694cciv7z9izlES5OYt+WxoEStPdAigGDBN6ZZ/7Sxy9f6SFj30pAZdIQY2vdbI7Ddxx f9cZWQxz/4rNJEglMxlqRn225rhKt2alyk+CGpD5Rebmlz+91HUNuaw4dEb1YKLCdawn YjH/GfMsOvYZcbMV0H/r24Bb+A0LaT39pN0dKsJpRlraZNd6Ijl5Qgqt0ggIn4WX6zX8 NnBrs8ItrfMDrP7wBsmF4MPLcF6nMCk3FOFWv+OuanZ3AUUzW4YWDUerjkIWd/OAaogd j6mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="p/33jGSg"; 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 n6-20020a170902d2c600b0016223c6e629si502213plc.235.2022.06.23.12.14.25; Thu, 23 Jun 2022 12:14:36 -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="p/33jGSg"; 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 S236925AbiFWSTG (ORCPT + 99 others); Thu, 23 Jun 2022 14:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236675AbiFWSQG (ORCPT ); Thu, 23 Jun 2022 14:16:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4532F5DF24; Thu, 23 Jun 2022 10:22:24 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CFAB861E0D; Thu, 23 Jun 2022 17:22:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 948FEC3411B; Thu, 23 Jun 2022 17:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004943; bh=rEsri6VIIz614gy0CUStunlPHlklMphIbEm3f/7WU4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p/33jGSgaqC5+rLgEiBcsDWIRIYpbn7RhJIqp2KcvM/fpiKXnqrp35HaMBGVRTamh 8IMo1joCq9nYRkao4FgFJoyaFrvPvu67H7kdrRFqTvvzbXNrvflIqTW0UI+22SM/yu 724iEEwIjlVRlDzB3sAzxGNX59/IotqmWTDqSLFk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Anna Schumaker , Sasha Levin Subject: [PATCH 4.19 199/234] pNFS: Dont keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE Date: Thu, 23 Jun 2022 18:44:26 +0200 Message-Id: <20220623164348.681792501@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@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.7 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 [ Upstream commit fe44fb23d6ccde4c914c44ef74ab8d9d9ba02bea ] If the server tells us that a pNFS layout is not available for a specific file, then we should not keep pounding it with further layoutget requests. Fixes: 183d9e7b112a ("pnfs: rework LAYOUTGET retry handling") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/pnfs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index a7d638bfb46b..cfb1fe5dfb1e 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2045,6 +2045,12 @@ pnfs_update_layout(struct inode *ino, case -ERECALLCONFLICT: case -EAGAIN: break; + case -ENODATA: + /* The server returned NFS4ERR_LAYOUTUNAVAILABLE */ + pnfs_layout_set_fail_bit( + lo, pnfs_iomode_to_fail_bit(iomode)); + lseg = NULL; + goto out_put_layout_hdr; default: if (!nfs_error_is_fatal(PTR_ERR(lseg))) { pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); -- 2.35.1