[PATCH v2] erofs-utils: mkfs: Implement 'dsunit' alignment on blobdev

Gao Xiang hsiangkao at linux.alibaba.com
Fri Aug 22 19:56:12 AEST 2025



On 2025/8/22 17:52, Friendy.Su at sony.com wrote:
> +       if (cfg.c_chunkbits && dsunit && 1u << (cfg.c_chunkbits - g_sbi.blkszbits) < dsunit) {
> +               erofs_warn("chunksize %u bytes is smaller than dsunit %u blocks, ignore dsunit !",
> +                               1u << cfg.c_chunkbits, dsunit);
> +               dsunit = 0;
> +       }
> 
> 'ignore dsunit' means set it to default, default dsunit is 0. Is this correct?
> > Then sbi->bmgr->dsunit will be set to 'dsunit'.

I think it just ignores `dsunit` since the current behavior also
ignores `dsunit` for blobchunks.

Let's not introduce extra behavior otherwise it could have three
different behaviors among different mkfs.erofs versions.

So you could just drop `dsunit = 0` line.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list