public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
From: Jonathan Calmels <jcalmels@nvidia.com>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <xiang@kernel.org>, Jonathan Calmels <jcalmels@nvidia.com>
Subject: [PATCH v2] erofs-utils: lib: relax erofs_write_device_table() device table check
Date: Thu, 12 Feb 2026 10:33:32 -0800	[thread overview]
Message-ID: <20260212183236.135058-1-jcalmels@nvidia.com> (raw)
In-Reply-To: <20260212001302.72193-2-jcalmels@nvidia.com>

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@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



  parent reply	other threads:[~2026-02-12 18:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12  0:13 [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check Jonathan Calmels
2026-02-12  9:13 ` Gao Xiang
2026-02-12 17:00   ` Jonathan Calmels
2026-02-12 17:21     ` Gao Xiang
2026-02-12 18:33 ` Jonathan Calmels [this message]
2026-02-13  1:13 ` [PATCH v3] " Jonathan Calmels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260212183236.135058-1-jcalmels@nvidia.com \
    --to=jcalmels@nvidia.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox