Skip to contentSkip to conversation

erofs-utils: mkfs: add support to issue directory data separately

PATCH New Gao Xiang 1 participant 1 message Nov 21, 2025 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: add support to issue directory data separately

Especially since compressed directory data could be in the packing inode, it would be better to compress them together.

It improves the overall compressed directory access performance.

---
 include/erofs/importer.h |  2 ++
 lib/inode.c              | 68 ++++++++++++++++++++++++++++++++++++----
 mkfs/main.c              |  6 ++--
 3 files changed, 68 insertions(+), 8 deletions(-)
include/erofs/importer.h +2 -0
index e1734b995ae8..a9d9c569d157 100644
@@ -44,6 +44,8 @@ struct erofs_importer_params {
 	char force_inodeversion;
 	bool ignore_mtime;
 	bool no_datainline;
+	/* Issue directory data (except inline data) separately from regular inodes */
+	bool grouped_dirdata;
 	bool hard_dereference;
 	bool ovlfs_strip;
 	bool dot_omitted;
lib/inode.c +62 -6

99 lines not on this page · raw message

mkfs/main.c +4 -2
index 76bf84348364..9719aec7952e 100644
@@ -1410,10 +1410,12 @@ static int mkfs_parse_options_cfg(struct erofs_importer_params *params,
 			tarerofs_decoder = EROFS_IOS_DECODER_GZRAN;
 			break;
 		case 536:
-			if (!optarg || strcmp(optarg, "1"))
+			if (!optarg || strcmp(optarg, "1")) {
 				params->compress_dir = true;
-			else
+				params->grouped_dirdata = true;
+			} else {
 				params->compress_dir = false;
+			}
 			break;
 		case 537:
 			if (!optarg || strcmp(optarg, "1"))
Signature · 1 line
2.43.5