On Thu, 23 Nov 2023 13:22:44 +0800 Gao Xiang <[email protected]> wrote:
> Previously, the block size always equaled to PAGE_SIZE in kernel, > therefore `lclusterbits` couldn't be less than 12. > > Since sub-page compressed blocks are now considered, `lobits` for > a lcluster in each pack of compact indexes 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) > > Signed-off-by: Gao Xiang <[email protected]> Reviewed-by: Yue Hu <[email protected]>
