From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 541AB30D3ED for ; Mon, 17 Aug 2026 01:34:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786930490; cv=none; b=RHvKOK5AfxWghwCfkHWBWnMiGmmTV3p057meg37BQmSyXnoVy+FrrJQx/USQgqVXgZHOD020376JJwzm2EUNCEsZ9DtNC54R9d9b3G9tM1IVVL3aB8CST3jezTAaPvrI6a1OEkwxhsEtI4yKQy88aVp0RDPUdid5zECoun4KtPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786930490; c=relaxed/simple; bh=mSM8ovCv5+qTsXibmEU7wAXi1t6T23viUGGLssGKrQ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FBsH5CKHa+pzpeDUUfglhP4jA8a4kM1xDz1BM6Lem2CdEuJwwJgWD/nhT6gVSqpcc929x86572zVdlnnDyQhXLI/ChA/tFv6vM0qlRWAVfp4GO5e8y2K6jbVENny2o9wPmIuad/rMeU//zJ4/bRW0073I14aI0ZagLfgS8S66ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a3plpabn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a3plpabn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F721F000E9; Mon, 17 Aug 2026 01:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786930487; bh=+M0Ig2bI89DLBk7czXEVENLWuPH8Hkt5TDkGEpg4ZpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=a3plpabnNhKk5xFNG86aVRWNSdl7xbqnMLPzZSkVke8eo69LX0EaEvNkqjtaBbFuP Y7gVVQKEpl9eKWS+dCom8oG1msoMAA6xZMoFOAbqpiBR/ydC1HEbEfxJTAmfEin6tj l1GyXvwv0/xGWY11V0848lHIdKA0SCHg7vREM5pdmR/o02BmkKgvrs0aXfzUwwGeUx 3i5x2uYlDLbAVTVl656sz5LTDbHekPVz6Du0Vr3UknG7Lc+Ob7oKiyef3XhyXwAf+J Igpdi7Wpxn8QmCea2VXtMOYMHaCBrFPG+NJzBSj5uL5YFiknQc4ID0KhcaI9z5ib6X pUA8M/+2Q0xVQ== Date: Mon, 17 Aug 2026 09:34:37 +0800 From: Gao Xiang To: Ojaswin Mujoo Cc: linux-erofs@lists.ozlabs.org, Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , linux-kernel@vger.kernel.org, Shirisha G Subject: Re: [PATCH 1/1] erofs: fix unused pcluster_pools for higher page sizes Message-ID: Mail-Followup-To: Ojaswin Mujoo , linux-erofs@lists.ozlabs.org, Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , linux-kernel@vger.kernel.org, Shirisha G References: <808f25346aeac628aa9968f786fdbba09366fd76.1786884312.git.ojaswin@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <808f25346aeac628aa9968f786fdbba09366fd76.1786884312.git.ojaswin@linux.ibm.com> Hi Ojaswin, On Sun, Aug 16, 2026 at 06:37:09PM +0530, 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 > Signed-off-by: Ojaswin Mujoo Thanks for catching this, looks fine to me: Reviewed-by: Gao Xiang Thanks, Gao Xiang