diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-12-06 17:10:55 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-12-15 01:47:19 +0800 |
commit | 8d2517aaeea3ab8651bb517bca8f3c8664d318ea (patch) | |
tree | 9da0507b31d028d11a506276230dc55d773c0142 /fs/tracefs | |
parent | 54ed3fdd66055d073cb1cd2c6c65bbc0683c40cf (diff) |
erofs: fix up compacted indexes for block size < 4096
Previously, the block size always equaled to PAGE_SIZE, therefore
`lclusterbits` couldn't be less than 12.
Since sub-page compressed blocks are now considered, `lobits` for
a lcluster in each pack cannot always be `lclusterbits` as before.
Otherwise, there is no enough room for the special value
`Z_EROFS_LI_D0_CBLKCNT`.
To support smaller block sizes, `lobits` for each compacted lcluster is
now calculated as:
lobits = max(lclusterbits, ilog2(Z_EROFS_LI_D0_CBLKCNT) + 1)
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231206091057.87027-4-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/tracefs')
0 files changed, 0 insertions, 0 deletions