From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AEA125525C; Thu, 3 Apr 2025 19:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743706956; cv=none; b=r+tbwYIfH4jKVci2dZYue88A3gHC+R4ueF94Fitp7nK6MYJ6uN0frt6mJ8BKm1pqUtJQu2RGjtEF7syhsfYs1w+fpIj9Zbpbmgzyf4O8m3Bm94aGlyILXhLN1fchEWc64MfG1giySj7ckoEAwtfmvaO9gz3GQB/Xcsvm0r3zth0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743706956; c=relaxed/simple; bh=ktphqHlHc+qHY+dP4whpQVX97Exe5E0m0Nbmj+5KDJE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PWNl2XtoCYU0iT9dqJsrxxRVzOI5gkqS7T8x9UpqZXjunARCCtvZHLEeh2xPPfFI0mDpY1cg39nV2FGDAp5tiYJFO+iEXeQoy52c3ou4yI/sphtzQla5tuSknR7SB2muBFcnvvmtRS+IUkz55hnptWT0iePSJT/N77MiYwLNNZs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=poQ7a+9+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="poQ7a+9+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FCCEC4CEE8; Thu, 3 Apr 2025 19:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743706956; bh=ktphqHlHc+qHY+dP4whpQVX97Exe5E0m0Nbmj+5KDJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=poQ7a+9+w/PR8EVTQF8w96pd9U5V0gC0Looga2RWiY4L0Ikptvx255gsSKtqG6Oxy T0PxG9WVaKZ6lFEgDlvWiVfi4SgdPJoel9eBQihET2JlBpmmkk5C53teG/ZcmlKLrJ ElEHtFpQGbv8r1SHtiU/F4HxS7ZZzuWVusmxXQlXVtd3IDPt6eZ1a8T+AcekY4q9qA sGR6azeLKINw8KL+6s8k6f00tI8Pp5/Vp1oX9XCo8NH4gLD/7IgKGGmzEaXKuCb080 NTGljzCX8BwgGuIN6yQ02gEJtLxgMgHMP/VAaZn0EXDmGTJjxYBOfkvDbBk0hq1yGs 9Jcql9d5PuNlQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chao Yu , Jaegeuk Kim , Sasha Levin , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 6.14 11/54] f2fs: don't retry IO for corrupted data scenario Date: Thu, 3 Apr 2025 15:01:26 -0400 Message-Id: <20250403190209.2675485-11-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250403190209.2675485-1-sashal@kernel.org> References: <20250403190209.2675485-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.14 Content-Transfer-Encoding: 8bit From: Chao Yu [ Upstream commit 1534747d3170646ddeb9ea5f7caaac90359707cf ] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] F2FS-fs (dm-105): inconsistent node block, nid:430, node_footer[nid:2198964142,ino:598252782,ofs:118300154,cpver:5409237455940746069,blkaddr:2125070942] If node block is loaded successfully, but its content is inconsistent, it doesn't need to retry IO. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 3dd25f64d6f1e..f238be29a70b0 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -765,8 +765,12 @@ void f2fs_update_inode_page(struct inode *inode) if (err == -ENOENT) return; + if (err == -EFSCORRUPTED) + goto stop_checkpoint; + if (err == -ENOMEM || ++count <= DEFAULT_RETRY_IO_COUNT) goto retry; +stop_checkpoint: f2fs_stop_checkpoint(sbi, false, STOP_CP_REASON_UPDATE_INODE); return; } -- 2.39.5