Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp613602pxx; Mon, 26 Oct 2020 16:56:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfzPhm05ZehJRDtKkJEUNLife+iPc+5QlEDhGJIPsGlWmPztDAugrkiDgIexL4+VceJag3 X-Received: by 2002:a17:906:5052:: with SMTP id e18mr17292615ejk.530.1603756608700; Mon, 26 Oct 2020 16:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603756608; cv=none; d=google.com; s=arc-20160816; b=dmKRzFglQEnWa9MZlcQ1HqmDPtts6OzqNBc18hlBLgB11vPcebx1agAItSqZUWBIok DETADww8czsDzwgHnVrPf6mRaJrqGxuHKtRz4nO3y71UXUCD5sJHG69IXEXG1NW7spSr bzeT9PdBUHNCV3ys9M8QYaMdx8hnhPfFIXut4/hFhsB1dn3eOMGDodiXvB2GvnjOOOw/ 75wIoKnODEx27kzI55+9+Zjwm5IgUHah1qPARlpfTsv8rftYHflN9QHToYTs63tzwDfK kNY0qv4tqH+yQvjU7fExBoeeb6aVWkG6yeDi25MAwSyFpZgAWco+ctnQjwC6D80XUBnX JjCQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=J61b71/QKe6oMcn0XjuH3n+b/7n0NtiU7bMRjrzYts8=; b=Mf0lR5woh4QjoYJOJ1hjz/9XVHhWXUvzq80k7gD+VHa5m3/s4Ge3QxyL2AqQFp+ld4 VEZoZsbhNErrs30/2CJirutNyeXFu4jdDIpKSUfZioJ95mE5ajcPUwSyw7eabx1zHDU5 G9u5ilEZzkja6bbm7IfObfaXCAwx8vP62fyreOFOAT7P6ISVYzJ68r8kPYK1KQ1U8+4m FQhJlQ1n5f0gdpwM77chNtGWdEoF6Elz/6hnKyN7XpZeKvUfEqRInEQKz+D5bQacd0+Z gtAYudCrXhrjhZkw9SaJ65uN/lWwYQc4ne06i/K+bvZMDsPtWBhG0ZY1JLjWEi8HQTDy xXYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dRWOwXFD; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l90si7856174edl.249.2020.10.26.16.56.26; Mon, 26 Oct 2020 16:56:48 -0700 (PDT) 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=@kernel.org header.s=default header.b=dRWOwXFD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1792967AbgJZTWR (ORCPT + 99 others); Mon, 26 Oct 2020 15:22:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:57556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1784492AbgJZTWR (ORCPT ); Mon, 26 Oct 2020 15:22:17 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89B3A2080A; Mon, 26 Oct 2020 19:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603740136; bh=pd2RJCqAVpfNGQ5ypEduTt4rIlya9sC2k1zp9YD13i0=; h=From:To:Cc:Subject:Date:From; b=dRWOwXFDqYd72SEFlryt/ijWt1i6SGzSPaHhD88/dqEhU4VIN7/w6ZdGVY7PGWef+ 97z5PlapHJycTe7li8HfPblsL1kS48G7f4n0rnY+QWrRMM61Q8drP17VRa87ySmvTB lFU9jvShyDA9DgTWerjpXzODnzq5hoNe7ewvyBv8= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Cc: Jaegeuk Kim Subject: [PATCH] f2fs: call f2fs_get_meta_page_retry for nat page Date: Mon, 26 Oct 2020 12:22:14 -0700 Message-Id: <20201026192214.4156137-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Jaegeuk Kim --- 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 d5d8ce077f29..42394de6c7eb 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.29.0.rc1.297.gfa9743e501-goog