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 571A93C0606 for ; Mon, 17 Aug 2026 08:54:42 +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=1786956883; cv=none; b=lM4X6zwiUBjKukb1eimUk4Npf7192X8uPcx7Qh/J11EnbcSFi8Mnt6o+QAcdEBfQb1qS7fG2/eaLWgVCESVDUONI6lurVZZjtnh0qtbbYc2dwLWsCiFmiLvYHmtXvUvzz7DhaN1Pg9yMa0lLwBD2qpOfP7PqsyzqylWpmTJNOVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786956883; c=relaxed/simple; bh=1DF/qb/DgzKxVcqoPBVsSisiBOHu6Ef/0SGblPJWMZ8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Mz5fWWbtGD2w8vOF4ISHIDzC0odGB594ZbgtgitxnAVQmNAHFBfkqO49JGp2jVJ7zVPYISB+advf2Z9bk3yXjcdCar9Op8Mfk02OLGFXrHyCjsxvZnaf+mT8kqhQIzTE6acL/H449D5nspJ0fQwj3XzLqqR2FKGQ7GFS2Cpj8eI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JENCxmXI; 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="JENCxmXI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFB9F1F000E9; Mon, 17 Aug 2026 08:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786956882; bh=0YH9DMmf0CJSIQD3g9u/Rz4rhSst1aZlH2cCZklKEss=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=JENCxmXIYM6lBeA1+4lXjo6QxJLZeC/2exLKqvXDKlyRbsr9YrkF0vFQMTg9li4SW 4ncdFaiFH8LkFJS3LYJLrTdlsXs3WAl+mycIFIlwp5E3MPzEzcvRAtc98yEjn9F1of 8jmha4VTiiWZElku1cvLinNq1qXKY6Qa0KNcLFH3ZoeYBdsLDi3aolnFyMP2Wr5YbG Hcd6X/1wKFGzE3jN12T+knUBF/v+5F+Je+5O3/5ydcfCHAgWFD8gdVERopig3sm2Jo X59V9bb3gUEnpMellxMBTS/9/EwGyixQomKhsf5sTkpBkay9cQW7984QepZJCMG8YN 3Ra8NSfQmFEgQ== Message-ID: <68fd8196-dabf-4288-bd95-7500a7408c32@kernel.org> Date: Mon, 17 Aug 2026 16:54:37 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Gao Xiang , 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 To: Ojaswin Mujoo , linux-erofs@lists.ozlabs.org References: <808f25346aeac628aa9968f786fdbba09366fd76.1786884312.git.ojaswin@linux.ibm.com> Content-Language: en-US From: Chao Yu In-Reply-To: <808f25346aeac628aa9968f786fdbba09366fd76.1786884312.git.ojaswin@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > Signed-off-by: Ojaswin Mujoo Reviewed-by: Chao Yu Thanks,