Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6136962iog; Thu, 23 Jun 2022 12:07:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTvEe6z7xvOXtg7U+qa9udHCz8nxE1cAH386l9pPTrjo3aHbY8PSYye/Q41MkSKd5eXfEM X-Received: by 2002:a17:902:9046:b0:168:b8ee:8164 with SMTP id w6-20020a170902904600b00168b8ee8164mr39069658plz.159.1656011230364; Thu, 23 Jun 2022 12:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011230; cv=none; d=google.com; s=arc-20160816; b=xUHYSp+W7lJ3BuXSr4yr3EIJIpZhrJOMoQ5j0HVTvvQ04SQEjH/fGq4iNKtVe14SP/ yJ0IMCu6TfJAPBgRtOSfLV+nBZ02RjUaRtqxXopLAh1EbS69YFRSiB12pXDQ5+vOiBWJ Z51YmbJheEeq1QRDC2n3eiILvl2U5PpJHdK0+JZUGG4yxaiWoVHPU7UBsS3KtuwXcnc8 z+pzkf1Ar18QOqNJ7uh5NlcLX/SsO6oEprrE+r07w3Rzz38lFO5mCS6O5lZISQTGIzB+ pySiAh9RIpjRsHWFfXV/vQ0ewsYQa8zXTIojutpJGHEOQbuVKTGCktaSvx+6A/Gn+VMa BY/w== 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=JxAi0EtEMUIqPgWR+enqgUgFqmZRnNJGGhGTGe6+ojg=; b=xi2M/gca/HaZg7brhC89ZpWpHTXfvyjcGkMfs0l5e1ofbQgUcymLNYfdZDh3xtWiWi 6lPk5Rzu4msKUo8XQvY1ez56Gov2oM6Ma47e8FYHma+3waWEKkE3g9G9ASD3QKaK3tBF lzFzm7UkuZl/D8CD2kiwvBC5w3AtbyDusiq6T/mYT0JQLIHPuhbzWPj1uoZtrJuw3oL2 I4nDk1F2RjUZGQFt+zHpnhhvTKZs6GXcH9YAbtYt2I4X3lQh/iMyd1rBBPjfgDvxvNMk qOk/Ie1k7DPbYeny5pR1lKESWMWERy6kJtnRPThkM+VbY0YnBTy4BiLnhwJfQhqQDRT3 bbWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dLJPf7j/"; 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 b16-20020a63cf50000000b003fc573fa56dsi23739360pgj.6.2022.06.23.12.06.56; Thu, 23 Jun 2022 12:07:10 -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="dLJPf7j/"; 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 S231139AbiFWRLr (ORCPT + 99 others); Thu, 23 Jun 2022 13:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229851AbiFWRKQ (ORCPT ); Thu, 23 Jun 2022 13:10:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C320356380; Thu, 23 Jun 2022 09:57:39 -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 B63C261407; Thu, 23 Jun 2022 16:57:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E8EBC3411B; Thu, 23 Jun 2022 16:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003437; bh=seg96an2EVSr8JlAr9r1UxI1Hc4dVBpC3LfTpnNt/6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dLJPf7j/lsd06/KarRmVyXoosWZEC16iVWLRNyQLGuDF3y5DRSgL0U3N5mCAZwAfQ TIGtZa8MCVl7bSn8ZkQyAqpldx+XCvvo/UyGkElIb3YAS2/KeXaCQjSpejBUDrn/cU PZ4xV0FbsjHHh6xDXQVzmv+rWMvExIO2iiQ+bhQA= 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.9 238/264] pNFS: Dont keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE Date: Thu, 23 Jun 2022 18:43:51 +0200 Message-Id: <20220623164350.810605101@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@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 f19cded49b29..317d22f84492 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1753,6 +1753,12 @@ pnfs_update_layout(struct inode *ino, /* Fallthrough */ 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