Re: [PATCH 1/1] erofs: fix unused pcluster_pools for higher page sizes

Chao Yu <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/16/26 21:07, Ojaswin Mujoo wrote:
> pcluster_pool[] hardcodes {1,4,16,64,128,Z_EROFS_PCLUSTER_MAX_PAGES+1},
> but the assumption of Z_EROFS_PCLUSTER_MAX_PAGES == 256 is only right
> for 4k page sizes. For higher page sizes like 16k or 64k, This results
> in us ending up with clusters bigger than what we will ever use, since
> we only support upto 1MB of compressed data. For example, on 64k page
> size we will only ever use clusters with nrpages= 1, 4 and 17.
> 
> This patch fixes the allocation for such higher pages sizes by adding
> some compile time checks.
> 
> Below are the clusters created right after boot on a 64KB page size
> machine
> 
> $cat /proc/slabinfo | grep pcluster | cut -d" " -f1:
> 
> Before the patch:
> 
> erofs_pcluster-1
> erofs_pcluster-4
> erofs_pcluster-16
> erofs_pcluster-17
> erofs_pcluster-64
> erofs_pcluster-128
> 
> 
> After the patch:
> 
> erofs_pcluster-1
> erofs_pcluster-4
> erofs_pcluster-17
> 
> Fixes: 9f6cc76e6ff0 ("erofs: introduce physical cluster slab pools")
> Reported-by: Shirisha G <[email protected]>
> Signed-off-by: Ojaswin Mujoo <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.