All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <xiang@kernel.org>
To: Jonathan Calmels <jcalmels@nvidia.com>
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>,
	linux-erofs@lists.ozlabs.org, xiang@kernel.org
Subject: Re: [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check
Date: Fri, 13 Feb 2026 01:21:40 +0800	[thread overview]
Message-ID: <aY4MJG_lHXy-bxWd@debian> (raw)
In-Reply-To: <aY4EXe96VKXsCb8R@nvidia.com>

On Thu, Feb 12, 2026 at 09:00:18AM -0800, Jonathan Calmels wrote:
> On Thu, Feb 12, 2026 at 05:13:31PM +0800, Gao Xiang wrote:
> > External email: Use caution opening links or attachments
> > 
> > Thanks for the patch, could you elaborate how to use this?

...

> 
> I'm relying on the library not the CLI, I think the equivalent would be:
> 
> mkfs.erofs -Efragments,noinline_data,ztailpacking a.erofs a/
> mkfs.erofs -Efragments,noinline_data,ztailpacking b.erofs b/
> mkfs.erofs merged.erofs a.erofs b.erofs
> mkfs.erofs --incremental=data merged.erofs c/

Could you document this in the commit message?

I think it makes sense, also lacks of `-z`
if `-Efragments` is specified.

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


How about updating to the following instead for now?

        if (!sbi->extra_devices)
                goto out;
-       if (!bh)
+       if (!bh) {
+               if (erofs_sb_has_device_table(sbi))
+                       return 0;
                return -EINVAL;
+       }

        pos = erofs_btell(bh, false);
        if (pos == NULL_ADDR_UL) {


Thanks,
Gao Xiang

> > > 
> > >       pos = erofs_btell(bh, false);
> > >       if (pos == EROFS_NULL_ADDR) {
> > 


  reply	other threads:[~2026-02-12 17:21 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 [this message]
2026-02-12 18:33 ` [PATCH v2] " Jonathan Calmels
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=aY4MJG_lHXy-bxWd@debian \
    --to=xiang@kernel.org \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=jcalmels@nvidia.com \
    --cc=linux-erofs@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.