From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA6D2C3600C for ; Thu, 3 Apr 2025 19:09:12 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1u0Pw8-0001Zc-Um; Thu, 03 Apr 2025 19:09:12 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1u0Pw7-0001ZW-SP for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Apr 2025 19:09:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5b6U9LNFMhSwKBIrntDNCwuvTqmY3x56sua9R44aC7Y=; b=bZwNLEYo++vBGKcZmmPgn6ZQfb lKOyxxiJtwc5DTrFX23WcCFxn/X+fcdwQ3WgYybXHkydsGyIlEFS5n+LZtY9bjmB/ER17iZxgh4ef 5Mb8hA/HyPLpDj44j2q37MHSx9zMF42qDOztt3a91Wre3G3kA8COxUUjgpKYu8SaokXk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=5b6U9LNFMhSwKBIrntDNCwuvTqmY3x56sua9R44aC7Y=; b=I wRrXGTSBsIwExiSDprCRe9aW4at0adX7TWsBwxAqsNomE6c9vyh4zOO6I3duxxaV/J4UpWVh5MU7i ZApW6nWc476r7Z0bg7CAJ3q8iSSX7TCOZDq0OgHZcqC6uxciRGRc/vfKIYA6UX3FmFFKpC5L/vsnN JEZTlZNh1Xpe8Xa8=; Received: from nyc.source.kernel.org ([147.75.193.91]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1u0Pvr-0003EI-Jy for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Apr 2025 19:09:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1D472A45985 for ; Thu, 3 Apr 2025 19:03:21 +0000 (UTC) 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== To: linux-kernel@vger.kernel.org, stable@vger.kernel.org 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 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.132 X-Headers-End: 1u0Pvr-0003EI-Jy Subject: [f2fs-dev] [PATCH AUTOSEL 6.1 01/18] f2fs: don't retry IO for corrupted data scenario X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sasha Levin via Linux-f2fs-devel Reply-To: Sasha Levin Cc: Sasha Levin , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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: stable@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