Skip to contentSkip to conversation

erofs-utils: mkfs: fix `--incremental=data` failure

PATCH New Gao Xiang 1 participant 1 message Jul 28 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: fix `--incremental=data` failure

idata_size should be set for erofs_prepare_tail_block().

Fixes c16df072941f ("erofs-utils: mkfs: support directory compression")
---
 lib/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/inode.c +2 -1
index 9f4d14c..0547b60 100644
@@ -1605,7 +1605,8 @@ static int erofs_mkfs_create_directory(const struct erofs_mkfs_btctx *ctx,
 	}
 
 	/* it will be used in erofs_prepare_inode_buffer */
-	if (inode->datalayout == EROFS_INODE_FLAT_INLINE)
+	if (inode->datalayout == EROFS_INODE_FLAT_INLINE ||
+	    inode->datalayout == EROFS_INODE_FLAT_PLAIN)
 		inode->idata_size = inode->i_size & (bsz - 1);
 
 	/*
Signature · 1 line
2.47.3