[PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check

Gao Xiang hsiangkao at linux.alibaba.com
Thu Feb 12 20:13:31 AEDT 2026


Hi Jonathan,

On 2026/2/12 08:13, Jonathan Calmels wrote:
> 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.
> 
> Signed-off-by: Jonathan Calmels <jcalmels at nvidia.com>

Thanks for the patch, could you elaborate how to use this?

A detailed command line usage would be better.

(Also honestly I will try to release erofs-utils 1.9 in
  a few days for the upcoming ubuntu LTS, so I have to
  finish erofs fsmerge feature for compression layout
  after the version is released...)

Thanks,
Gao Xiang

> ---
>   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) {



More information about the Linux-erofs mailing list