[PATCH v2] erofs-utils: lib: relax erofs_write_device_table() device table check
Jonathan Calmels
jcalmels at nvidia.com
Fri Feb 13 05:33:32 AEDT 2026
Avoid returning an error in erofs_write_device_table()
if a new device slot table hasn't been allocated.
Rationale is to allow erofs_importer_flush_all() to succeed when
dealing with images with pre-existing device slots.
This effectively allows the following:
mkfs.erofs -Enoinline_data a.erofs a/
mkfs.erofs -Enoinline_data b.erofs b/
mkfs.erofs merged.erofs a.erofs b.erofs
mkfs.erofs --incremental=data merged.erofs c/
Signed-off-by: Jonathan Calmels <jcalmels at nvidia.com>
---
lib/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/super.c b/lib/super.c
index a203f96..d38396f 100644
--- a/lib/super.c
+++ b/lib/super.c
@@ -392,7 +392,7 @@ int erofs_write_device_table(struct erofs_sb_info *sbi)
if (!sbi->extra_devices)
goto out;
if (!bh)
- return -EINVAL;
+ goto out;
pos = erofs_btell(bh, false);
if (pos == EROFS_NULL_ADDR) {
--
2.53.0
More information about the Linux-erofs
mailing list