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 158DF254860; Thu, 3 Apr 2025 19:08:49 +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=1743707330; cv=none; b=Fe9/PuqDRBnnn3PAOS++aoQAx/8h8OhP5gGKEvNrG2sarVpt93B2PupQ6QGNkqCKqqHMwKqfuUDVqv40YN/lo0hVgJmVz2/Jklj73S8r75fEoa2b8FWR/OQJ/B4l0JfoO9/ZYp3wjusWzCbvc21w8kakGXfm8c0OzaBAMMTTnTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743707330; c=relaxed/simple; bh=31qml0/iNhP6NOnbcgyfBLyp+AgDapTBIXOEU9nFwqs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EoB1NgHCSj8aT0hwAagYgQp0Pf9a6b8NgumQ9byPsE1gqMfelE5V4nacM4lDr//mKUut2TC+D6EXB1XFVhtpNRFr86aAJLBoLGte1GVYkGZcpIZGgd+8OrnxJRoMussvzpqvszBAB8HXkgOZJvJc2O8ZDvot7/JwyM4S5zvchI8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p9/mhEPy; 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="p9/mhEPy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4721C4CEE3; Thu, 3 Apr 2025 19:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743707329; bh=31qml0/iNhP6NOnbcgyfBLyp+AgDapTBIXOEU9nFwqs=; h=From:To:Cc:Subject:Date:From; b=p9/mhEPyzojBsFJ5Cif0QtU46nmxONXS+TP6CZkeSh+ZcJbfJ3jupBUwFMTRpYdA1 oKzqxlAFZTbc60di4MOSmEsMrPKeMBcRZzvWic394fxUNTfwBWiG7DoWpwXmvDIKog JPtHRkbaWIJ5SHFpV1ARYLNcYr/QDf2OId3FUKe39LwL1QWU+JS0DoItZFUx/V0Gs9 OxBOPep7ajSPSkngeorfPDgXXt+0DmTPp3xEanXkbctjC0jwwEVysTvePGuyStuO6n +fpNhjraWxsP4ekD3sqUCjwyMORGTvJBQ58ClsKiBPWhVXbQ/SA9IKnBVps1q+XERf QVSO5IrSB8beA== 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.1 01/18] f2fs: don't retry IO for corrupted data scenario Date: Thu, 3 Apr 2025 15:08:27 -0400 Message-Id: <20250403190845.2678025-1-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 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.1.132 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 0f350368dea73..b8296b0414fcb 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -695,8 +695,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