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 4F35D26A0A2; Thu, 3 Apr 2025 19:06:18 +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=1743707178; cv=none; b=fZk1EfwJ0DSZioM20m+pP9pgeOwBMCcICmG+llwynwDcl06z9b9tANWqZ+AraJlZLKgUl1zNWjgnejee3RTiyf421fhCXip7JZKKPW11BM/oB/IktUWwvXf+ivsiWQ89YZayPoQhoXzf77xLO41xvreLdg9ytae84Ghr5tESvO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743707178; c=relaxed/simple; bh=0+wjraBOKQcfYMWpbGZu3h4vudmozFUF00WLgRV4iaw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SRtS+nEuDn2LZSsbib9LCGDq14vbAvE/L1g4OEp1AolWRP4lA4w8R7KIn4PAgmmdkZ1dakoMTTla4aygPp5u0Fxn4gBg1k8C7RlEIjQUKwAuJnOAi7u+F2HXcJrWfIC3P0KzlwhT+mz9o9u8U5J2ZwgYa1/4BvispxcQvqqQJE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I9p3KYJK; 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="I9p3KYJK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74882C4CEE8; Thu, 3 Apr 2025 19:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743707178; bh=0+wjraBOKQcfYMWpbGZu3h4vudmozFUF00WLgRV4iaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I9p3KYJKg7bhpsjf5eWsxEut0Lplh3cYQgyFfNqr9GbSbBvJ7KoqA5iVlb+V2LjDR 5HH0JsRXhASLXw5SGKb9iJDiF2JSQKNsGdGnqKDxQmIedcRKxO37PeL98uOcYfJW9W LEkl+Mbwq3tL/vSpoFDGB6ip5dmxLn0pUZd/8vGmT4UbkOajPHAt2k5c6pQbTtUdV2 dosKZEjUYN67vsOcVP/u9AZvnGyxL1Pf8EpYPBFo6Vd4KrgDzRmsQKokw72FvHCV4i Inl0xQ73z5+zzm/4xSsmhh4rHZzRirtC29qvUn5deU34u9/DOCSOi2ffc5DT44NFNh R34sltuKpJRIQ== 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.12 09/47] f2fs: don't retry IO for corrupted data scenario Date: Thu, 3 Apr 2025 15:05:17 -0400 Message-Id: <20250403190555.2677001-9-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250403190555.2677001-1-sashal@kernel.org> References: <20250403190555.2677001-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.12.21 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 10780e37fc7b6..6135eee771cc9 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -751,8 +751,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