[PATCH] erofs-utils: add missing block counting

Gao Xiang hsiangkao at linux.alibaba.com
Wed Apr 24 15:43:33 AEST 2024



On 2024/4/24 13:33, Noboru Asai wrote:
> Hi Gao,
> 
> I think that erofs_balloc() and erofs_bh_baloon() function in
> erofs_write_tail_end()
> also alloc a tail block, Is it not true?

erofs_prepare_tail_block() is the place to decide the fallback
tail block. But due to some dependency, bh can be allocated in
erofs_write_tail_end() later.

erofs_write_tail_end() is designed for filling tail data, not
decide to get a fallback tail block, anyway.

commit 21d84349e79a ("erofs-utils: rearrange on-disk metadata")
changed the timing due to some dependency as I said before, but
later I need to revisit it.  erofs_prepare_tail_block() is the
original place to decide if a fallback tail block is needed,
that is also true for old versions.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list