kumquat-buildroot/package/erofs-utils/0003-erofs-utils-lib-fix-blobdev-without-Eforce-chunk-ind.patch
Gao Xiang c2e32e6558 package/erofs-utils: bump version to 1.4
- new upstream version;
- add 0001-erofs-utils-dump-fix-de-nid-issues.patch [1];
- add 0002-fsck-main.c-add-missing-include.patch [2];
- add 0003-erofs-utils-lib-fix-blobdev-without-Eforce-chunk-ind.patch [3];
- add 0004-erofs-utils-fix-Makefile-for-fsck.erofs-manpage.patch [4].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?id=17eb5c417bd56be4b2f7627c2d6879fbad6a86d6
[2] https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?id=1ca453ee89894b1669ac78d7f216bda172783e8d
[3] https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?id=eb255afa101b52096bd3e5e48f990576190f03bd
[4] https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?id=534eda7f8678e5b8fc8ca0f5cf0d9d7a932e0d48

Signed-off-by: Gao Xiang <hsiangkao@aol.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-10 22:09:30 +01:00

41 lines
1.4 KiB
Diff

From eb255afa101b52096bd3e5e48f990576190f03bd Mon Sep 17 00:00:00 2001
From: Gao Xiang <hsiangkao@linux.alibaba.com>
Date: Thu, 23 Dec 2021 16:49:07 +0800
Subject: [PATCH] erofs-utils: lib: fix --blobdev without -Eforce-chunk-indexes
blockmap is used by default, chunk indexes should be switched
instead if --blobdev is specified.
Link: https://lore.kernel.org/r/20211223084907.93020-1-hsiangkao@linux.alibaba.com
Fixes: 016bd812be1e ("erofs-utils: mkfs: enable block map chunk format")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
lib/blobchunk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/blobchunk.c b/lib/blobchunk.c
index 5e9a88a30af3..a145be917b4a 100644
--- a/lib/blobchunk.c
+++ b/lib/blobchunk.c
@@ -113,7 +113,7 @@ int erofs_blob_write_chunk_indexes(struct erofs_inode *inode,
if (multidev) {
idx.device_id = 1;
- inode->u.chunkformat |= EROFS_CHUNK_FORMAT_INDEXES;
+ DBG_BUGON(!(inode->u.chunkformat & EROFS_CHUNK_FORMAT_INDEXES));
} else {
base_blkaddr = remapped_base;
}
@@ -171,6 +171,8 @@ int erofs_blob_write_chunked_file(struct erofs_inode *inode)
int fd, ret;
inode->u.chunkformat |= inode->u.chunkbits - LOG_BLOCK_SIZE;
+ if (multidev)
+ inode->u.chunkformat |= EROFS_CHUNK_FORMAT_INDEXES;
if (inode->u.chunkformat & EROFS_CHUNK_FORMAT_INDEXES)
unit = sizeof(struct erofs_inode_chunk_index);
--
2.30.2