[PATCH] erofs-utils: add missing block counting

Gao Xiang hsiangkao at linux.alibaba.com
Wed Apr 24 14:54:29 AEST 2024


Hi Noboru,

On 2024/4/24 12:34, Noboru Asai wrote:
> Add missing block counting when the data to be inlined is not inlined.
> 
> Signed-off-by: Noboru Asai <asai at sijam.com>


Thanks for catching this! Could we fixup this at
erofs_prepare_tail_block()?

since currently it the place to allocate a tail block for this.

Thanks,
Gao Xiang

> ---
>   lib/inode.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/inode.c b/lib/inode.c
> index cf22bbe..727dcee 100644
> --- a/lib/inode.c
> +++ b/lib/inode.c
> @@ -840,6 +840,7 @@ static int erofs_write_tail_end(struct erofs_inode *inode)
>   		inode->idata_size = 0;
>   		free(inode->idata);
>   		inode->idata = NULL;
> +		inode->u.i_blocks += 1;
>   
>   		erofs_droid_blocklist_write_tail_end(inode, erofs_blknr(sbi, pos));
>   	}


More information about the Linux-erofs mailing list