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

Fixes: 0d0aa8522672 ("erofs-utils: lib: migrate pclustersize configurations")
Signed-off-by: Gao Xiang <[email protected]>
---
 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


Reply via email to