]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: compress: do sanity check on cluster when CONFIG_F2FS_CHECK_FS is on
authorChao Yu <chao@kernel.org>
Mon, 28 Aug 2023 14:04:16 +0000 (22:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:37 +0000 (16:29 +0200)
commit4263b3ef81e4b671278de003bfbbac8675bde62f
tree2679afb8f5b12ec68d92470ea7765e540f381679
parentfc18e655b62ac6bc9f12f5de0d749b4a3fe1e812
f2fs: compress: do sanity check on cluster when CONFIG_F2FS_CHECK_FS is on

[ Upstream commit 2aaea533bf063ed3b442df5fe5f6abfc538054c9 ]

This patch covers sanity check logic on cluster w/ CONFIG_F2FS_CHECK_FS,
otherwise, there will be performance regression while querying cluster
mapping info.

Callers of f2fs_is_compressed_cluster() only care about whether cluster
is compressed or not, rather than # of valid blocks in compressed cluster,
so, let's adjust f2fs_is_compressed_cluster()'s logic according to
caller's requirement.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Stable-dep-of: f785cec298c9 ("f2fs: compress: don't redirty sparse cluster during {,de}compress")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/compress.c
fs/f2fs/data.c