diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-03-12 05:45:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 11:38:19 +0300 |
commit | d184d6c164d22e7506c914855bf2b6d8584ae9da (patch) | |
tree | 40985006326d0ce27b9c8c982bd835568cdec3b2 /drivers/tee | |
parent | 926952e6366ab3b8019d3e2c7ae0685e3547c6ca (diff) | |
download | linux-d184d6c164d22e7506c914855bf2b6d8584ae9da.tar.xz |
f2fs: fix to account compressed blocks in f2fs_compressed_blocks()
[ Upstream commit 1a67cbe141cf991af252a88143d0fd975be2d9e7 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/tee')
0 files changed, 0 insertions, 0 deletions