Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9076778pxu; Mon, 28 Dec 2020 06:06:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUAB2Kc1BbXxQY+p/uipJ9VauSvf2nfGSgAM8Q2brS9XLkJak6P3JRYVhKW7rIkEE9EvYY X-Received: by 2002:a17:906:af99:: with SMTP id mj25mr42633048ejb.414.1609164368977; Mon, 28 Dec 2020 06:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164368; cv=none; d=google.com; s=arc-20160816; b=YVuX2teMRl4tcrFnPboOXcYDgDXHM0yW7iWOUvLs6uyp4w0JSFwvZVJRBxNK08m9fY qXLN13AlFHMukwQDcKgEqpuSeNzlb0kWLeWGjC5KN6fu3EQIEoZ8Nxm95DU/7Z2+tn8S LfSoGBxEvt/GdcFuR1Ifn0anJjqLRpmhtvZEBCVJlK+44pmjAJSR0CNwhx2JE8kgYGcl Y7g34BZndLiMZ26CfFeuv7taV5fN263DLZaUF+qmudkOdeRmO9VbiBvGlWlg/2VDfgz+ 4BJ71FTA1VcQBnzsV0tTIoHJkxYDLWkqKfmwCb7p4YRkYxwxecow+vYsMgoBBWe9kc2N KnzA== 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=Zqeav+S4c3A+Vm511jAPoE7VB7UujP/RSn0PpU9PEUs=; b=NMsfbxo7GYKhGJkhr4XObbFZKouD+iPlzehVeskwgmSg59s4x6iBiXRsqkcSRLkTwR J7QZnKiElVGZxw0WgbG+/FJoIAwIGyBahHtMqloeooCoH7T2/PZ2ZDLbPiiZqUoga8ap fpzk1zxihnRDRVXjVvNUs9X/hpCeOWlLLvzNHJdhM1FSLczSGbyfOfqbem1e4Lgf7/48 HIeRY+sWpbbJbiN+c8OqMgCB6VeA1i96wbE8Enow1Ur4waXMp4+nMxJg6JEvLewNUJir HQPNq9DFQf+y3MRbiilEBehGRMKKDw6izmEp8V1g9Ohs5R1E5xNwM4sy2Ij++KPhBWka 32HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VRcZ5MAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hj15si19210874ejb.734.2020.12.28.06.05.46; Mon, 28 Dec 2020 06:06:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VRcZ5MAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2436722AbgL1OB7 (ORCPT + 99 others); Mon, 28 Dec 2020 09:01:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:34738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436606AbgL1OB2 (ORCPT ); Mon, 28 Dec 2020 09:01:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 16C032063A; Mon, 28 Dec 2020 14:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164073; bh=DfilrvHsRPVqfUGyNqQC0ZBzPrA7x8oSACQBQbae+1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRcZ5MAr1NqBQcVGyH9LrmHSkyfcrB2/G1EDUh8iKp6zAxJeIUeiisoXt9wJJ/0uY YlG2n8QQ1/41pjVYSkgJaDu5DwVvRSu/VcHdKnY7+sUI3xiClzgqwKwV2KfJZIE/Kn tI3Tj3HMDer2L3mCrJx/OZ6PaHO4zk4K56VwBaBA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.10 043/717] f2fs: call f2fs_get_meta_page_retry for nat page Date: Mon, 28 Dec 2020 13:40:41 +0100 Message-Id: <20201228125023.050885524@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jaegeuk Kim [ Upstream commit 3acc4522d89e0a326db69e9d0afaad8cf763a54c ] When running fault injection test, if we don't stop checkpoint, some stale NAT entries were flushed which breaks consistency. Fixes: 86f33603f8c5 ("f2fs: handle errors of f2fs_get_meta_page_nofail") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index d5d8ce077f295..42394de6c7eb1 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -109,7 +109,7 @@ static void clear_node_page_dirty(struct page *page) static struct page *get_current_nat_page(struct f2fs_sb_info *sbi, nid_t nid) { - return f2fs_get_meta_page(sbi, current_nat_addr(sbi, nid)); + return f2fs_get_meta_page_retry(sbi, current_nat_addr(sbi, nid)); } static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid) -- 2.27.0