[PATCH 3/3] erofs-utils: allow blkaddr == EROFS_NULL_ADDR for zpacking in write_compacted_indexes()
Noboru Asai
asai at sijam.com
Thu Apr 18 15:52:31 AEST 2024
With ztailpacking, the value of blkaddr corresponding to the ztailpacking block
in the extent list is EROFS_NULL_ADDR(-1), allow this value in write_compacted_indexes()
function.
Signed-off-by: Noboru Asai <asai at sijam.com>
---
lib/compress.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/compress.c b/lib/compress.c
index d745e5b..5b70490 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -790,7 +790,8 @@ static void *write_compacted_indexes(u8 *out,
*dummy_head = true;
update_blkaddr = false;
- if (cv[i].u.blkaddr != blkaddr) {
+ if (cv[i].u.blkaddr != EROFS_NULL_ADDR &&
+ cv[i].u.blkaddr != blkaddr) {
if (i + 1 != vcnt)
DBG_BUGON(!final);
DBG_BUGON(cv[i].u.blkaddr);
--
2.44.0
More information about the Linux-erofs
mailing list