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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Sep 2023 20:49:33 +0000 (13:49 -0700)
commit2aaea533bf063ed3b442df5fe5f6abfc538054c9
treee826db4bcc24b86d7b166b658379c291fe310e3f
parentb0327c84e91a0f4f0abced8cb83ec86a7083f086
f2fs: compress: do sanity check on cluster when CONFIG_F2FS_CHECK_FS is on

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>
fs/f2fs/compress.c
fs/f2fs/data.c