Skip to contentSkip to conversation

erofs-utils: mkfs: set LZ4_0PADDING unconditionally

PATCH New Gao Xiang 1 participant 1 message Dec 30, 2025 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: set LZ4_0PADDING unconditionally

LZ4_0PADDING has been set unconditionally since very early Linux EROFS versions (kernel < 5.4).

As those pre-5.10 kernels are end-of-life, just drop support for disabling LZ4_0PADDING now.

---
 include/erofs/importer.h | 1 -
 lib/compress.c           | 3 +--
 mkfs/main.c              | 6 +++---
 3 files changed, 4 insertions(+), 6 deletions(-)
include/erofs/importer.h +0 -1
index a9d9c569d157..a525b474f1d5 100644
@@ -51,7 +51,6 @@ struct erofs_importer_params {
 	bool dot_omitted;
 	bool no_xattrs;			/* don't store extended attributes */
 	bool no_zcompact;
-	bool no_lz4_0padding;
 	bool ztailpacking;
 	char dedupe;
 	bool fragments;
lib/compress.c +1 -2
index 7a5d4374afe2..58d1f4de09db 100644
@@ -2186,8 +2186,7 @@ int z_erofs_compress_init(struct erofs_importer *im)
 	} else {
 		sbi->available_compr_algs = available_compr_algs;
 
-		if (!params->no_lz4_0padding)
-			erofs_sb_set_lz4_0padding(sbi);
+		erofs_sb_set_lz4_0padding(sbi);
 		if (available_compr_algs & ~(1 << Z_EROFS_COMPRESSION_LZ4))
 			erofs_sb_set_compr_cfgs(sbi);
 	}
mkfs/main.c +3 -3
index aaa0300bca1b..b45368f301f3 100644
@@ -325,9 +325,9 @@ static int erofs_mkfs_feat_set_legacy_compress(struct erofs_importer_params *par
 {
 	if (vallen)
 		return -EINVAL;
-	/* disable compacted indexes and 0padding */
-	params->no_zcompact = true;
-	params->no_lz4_0padding = true;
+	if (en)
+		erofs_warn("ancient !lz4_0padding layout (< Linux 5.4) is no longer supported");
+	params->no_zcompact = en;
 	return 0;
 }
 
Signature · 1 line
2.43.5