[PATCH 1/2] erofs-utils: lib: fix incorrect big pcluster judgment

Gao Xiang hsiangkao at linux.alibaba.com
Sun Sep 28 02:25:47 AEST 2025


`params->pclusterblks_max` should be greater than 1.

Fixes: 0d0aa8522672 ("erofs-utils: lib: migrate pclustersize configurations")
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
 lib/compress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compress.c b/lib/compress.c
index b4c2d1b..f879d3e 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -2130,7 +2130,7 @@ int z_erofs_compress_init(struct erofs_importer *im)
 	 * if big pcluster is enabled, an extra CBLKCNT lcluster index needs
 	 * to be loaded in order to get those compressed block counts.
 	 */
-	if (params->pclusterblks_max) {
+	if (params->pclusterblks_max > 1) {
 		if (pclustersize_max > Z_EROFS_PCLUSTER_MAX_SIZE) {
 			erofs_err("pcluster size (%u blocks) is too large",
 				  params->pclusterblks_max);
-- 
2.43.5



More information about the Linux-erofs mailing list