f2fs: compress: avoid duplicate counting of valid blocks when read compressed file
authorFengnan Chang <changfengnan@vivo.com>
Thu, 12 Aug 2021 11:36:41 +0000 (19:36 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Aug 2021 20:46:05 +0000 (13:46 -0700)
commita2649315bcb88a136ce978a06af8aa23ea8b4154
tree6a2863d0ce6c34ade071eb42aaa4b7a840961cee
parent65ddf6564843890a58ee3b18bb46ce67d96333fb
f2fs: compress: avoid duplicate counting of valid blocks when read compressed file

Since cluster is basic unit of compression, one cluster is compressed or
not, so we can calculate valid blocks only for first page in cluster,
the other pages just skip.

Signed-off-by: Fengnan Chang <changfengnan@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c