Re: [PATCH v3 3/4] erofs-utils: mfks: add rebuild FULLDATA for combined EROFS images

Gao Xiang <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs
Message-ID <[email protected]>

On 2026/4/15 11:35, zhaoyifan (H) wrote:
> This patch incorrectly handles inline inode:
> 
> Reproduce in erofs-utils directory:
>      mkfs/mkfs.erofs 1.erofs man/
>      mkfs/mkfs.erofs 2.erofs docs/
>      mkfs/mkfs.erofs --clean=data merged.erofs 1.erofs 2.erofs
> 
> Then PERFORMANCE.md in merged.erofs contains incorrect data after offset 0x2000.
> 
> Fixed with following diff:
> 
> diff --git a/lib/inode.c b/lib/inode.c
>    index bd10e26..36dce56 100644
>    --- a/lib/inode.c
>    +++ b/lib/inode.c
>    @@ -683,6 +683,13 @@ static int erofs_write_unencoded_data(struct erofs_inode *inode,
> 
>          /* read the tail-end data */
>          if (inode->idata_size) {
>    +             /*
>    +              * If inode->idata is already present, the caller has prepared
>    +              * the tail data and nothing more needs to be done here.
>    +              */
>    +             if (inode->idata)
>    +                     return 0;

Yes, it should be fixed as:
	/*
	 * Read the tail-end data if inode->idata is NULL; if the tail data
	 * has been prepared then nothing more needs to be done here.
	 */
	if (inode->idata_size && !inode->idata) {
	}

...

>> +#include "liberofs_cache.h"
> Unnecessary include `liberofs_cache.h`

That would be nice to be addressed too.


I've applied [PATCH 1 and 2], could you send v4 to address this?

Thanks,
Gao Xiang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.