Chao Yu 1a67cbe141 f2fs: fix to account compressed blocks in f2fs_compressed_blocks()
por_fsstress reports inconsistent status in orphan inode, the root cause
of this is in f2fs_write_raw_pages() we decrease i_compr_blocks incorrectly
due to wrong calculation in f2fs_compressed_blocks().

So this patch exposes below two functions based on __f2fs_cluster_blocks:
- f2fs_compressed_blocks: get count of compressed blocks in compressed cluster
- f2fs_cluster_blocks: get count of valid blocks (including reserved blocks)
in compressed cluster.

Then use f2fs_compress_blocks() to get correct compressed blocks count in
f2fs_write_raw_pages().

sanity_check_inode: inode (ino=ad80) hash inconsistent i_compr_blocks:2, i_blocks:1, run fsck to fix

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-03-22 21:16:29 -07:00
..
2019-05-08 21:23:11 -07:00
2018-09-12 13:07:10 -07:00
2020-03-19 11:41:25 -07:00
2020-01-30 15:39:24 -08:00
2020-03-19 11:41:26 -07:00
2018-09-12 13:07:10 -07:00
2020-03-19 11:41:26 -07:00
2020-01-30 15:39:24 -08:00
2020-01-17 16:48:07 -08:00
2020-03-10 09:18:33 -07:00
2020-03-19 11:41:26 -07:00
2020-03-19 11:41:25 -07:00
2020-03-10 09:18:33 -07:00
2020-03-19 11:41:25 -07:00
2018-09-12 13:07:10 -07:00