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 E0407C021A0 for ; Wed, 12 Feb 2025 01:55:09 +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 1ti1y1-0003q6-97; Wed, 12 Feb 2025 01:55:08 +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 1ti1xy-0003py-Dc for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Feb 2025 01:55:05 +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=995c5LESKrxAqGpUs+s8O+5YcT98e3tZWGvaeRjg4l8=; b=QrOFmIWFq8Fu8gfPyBOyzKj+PF pNu4M9R0HKqyY+75PSyHh8TQHfbiDi3LHsdftIRJ8lX9DL8IcfZK4/fssUlm9g1l08FdCvN0kUBCj wxJV7pe0t3KC08ChzNriH02JxHrfz5jWV69ZCsA2zxnnQ7UKG0gq7Yaq/ekwWYQDvfIs=; 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=995c5LESKrxAqGpUs+s8O+5YcT98e3tZWGvaeRjg4l8=; b=l Ycckz63K5XCUsUFAx6caQZsU0c65oWZH8BjGPzdFBxcAFVoYf7/5CQcmFmwLA10ZQtbwUFRii8gRd 4LRm6kXd5GpXAzAOiglrD3K/QHEjg6prlFbKsilSC4HaCFxXbYOTPyi3I8tnSSoFhpr6J9JZ5NoYs eq1e2BU1VIngJ/bA=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ti1xx-0006nb-3S for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Feb 2025 01:55:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 25DD35C59C6 for ; Wed, 12 Feb 2025 01:54:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6675CC4CEE4; Wed, 12 Feb 2025 01:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739325294; bh=k1i6OnM4vggKxSRbw8FWHtmyl30AxTlQ0Io8rRqVT3s=; h=From:To:Cc:Subject:Date:From; b=fzisAyF9kn2B5OPov1zXdhCd/Kiy6J9cWng1fouKc8AzXJMW7jidDhjDGO+K4A9ks gwCC0cITtqzWZ7PPsyGg7M34l/STKSbWNgfnTrRwVvdbphR9lYqbfNdmx9UyngTg2y ME9ymtOvmaERx4jwhkJB0NGDLl7SB2+RVygmZqxEKSvJ5c5/S9HNEMwzNfvy9HeXCE ncO+jhTjVoxDt+YPPk4x1AKjEq1SGjvCaeantoxtkkXLmwMi60sruFvmrKd6pBSycA vontoo041CE0xjMJFLf05MAUXlBkeVEzB+U9IM/4d+KAlDnerTiywOWTm80MkpofCU 30P3oAjxR6XrA== To: jaegeuk@kernel.org Date: Wed, 12 Feb 2025 09:54:12 +0800 Message-ID: <20250212015413.666375-1-chao@kernel.org> X-Mailer: git-send-email 2.48.1.502.g6dc24dfdaf-goog MIME-Version: 1.0 X-Headers-End: 1ti1xx-0006nb-3S Subject: [f2fs-dev] [PATCH 1/2] 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: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: linux-kernel@vger.kernel.org, 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 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 --- fs/f2fs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index cba2f6bacde4..d6ad7810df69 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.48.1.502.g6dc24dfdaf-goog _______________________________________________ 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 04A8E6F30C for ; Wed, 12 Feb 2025 01:54:54 +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=1739325295; cv=none; b=n2SgTBuQn8AnBR99eoQodgc6gmfppC1wTh/3mJi+QYQ9h45/yFjvkAyIdNB6BVwafgkDWyW2c27VGL/zK6+RYaTtjETM5rZvONGSKeSXM7ZHieLcScjrxBikQQ7tqCquugEGL4eRd+aqk9QJaFIR3dTRNlAoF9kcSNlGXtP8EkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739325295; c=relaxed/simple; bh=k1i6OnM4vggKxSRbw8FWHtmyl30AxTlQ0Io8rRqVT3s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DLyXavyU/5KyJpyl1HeSIOaVqJ65qhXrMLTVUD1ZxUErhKdtiGeY4IrQI0P1paPKVFcFyBU3XMrsiFnVPN2V0wivlTnWM84ThzsRDwHoV0O78wIXmD8PAUJiwjZL7a9BxJeXoXkx0ibuh7lD/h6pJ7QWHt1W+9SteFl3W5VqAwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fzisAyF9; 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="fzisAyF9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6675CC4CEE4; Wed, 12 Feb 2025 01:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739325294; bh=k1i6OnM4vggKxSRbw8FWHtmyl30AxTlQ0Io8rRqVT3s=; h=From:To:Cc:Subject:Date:From; b=fzisAyF9kn2B5OPov1zXdhCd/Kiy6J9cWng1fouKc8AzXJMW7jidDhjDGO+K4A9ks gwCC0cITtqzWZ7PPsyGg7M34l/STKSbWNgfnTrRwVvdbphR9lYqbfNdmx9UyngTg2y ME9ymtOvmaERx4jwhkJB0NGDLl7SB2+RVygmZqxEKSvJ5c5/S9HNEMwzNfvy9HeXCE ncO+jhTjVoxDt+YPPk4x1AKjEq1SGjvCaeantoxtkkXLmwMi60sruFvmrKd6pBSycA vontoo041CE0xjMJFLf05MAUXlBkeVEzB+U9IM/4d+KAlDnerTiywOWTm80MkpofCU 30P3oAjxR6XrA== From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH 1/2] f2fs: don't retry IO for corrupted data scenario Date: Wed, 12 Feb 2025 09:54:12 +0800 Message-ID: <20250212015413.666375-1-chao@kernel.org> X-Mailer: git-send-email 2.48.1.502.g6dc24dfdaf-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- fs/f2fs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index cba2f6bacde4..d6ad7810df69 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.48.1.502.g6dc24dfdaf-goog