On 2025/8/22 17:56, Gao Xiang wrote:


On 2025/8/22 17:52, friendy...@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.

So I tend to just kill `dsunit = 0` here, and change

`if (sbi->bmgr->dsunit > 1) {` into
`if (sbi->bmgr->dsunit >= 1u << (cfg.c_chunkbits - g_sbi.blkszbits)) {`

to match the previous `ignore` behavior for dsunit < chunksize.

Thanks,
Gao Xiang

Reply via email to