[PATCH v2] erofs-utils: mkfs: use scandir for stable output

Jooyung Han jooyung at google.com
Tue Dec 3 17:37:31 AEDT 2024


(I forgot to reply all)

On Tue, Dec 3, 2024 at 11:36 AM Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
>
>
>
> On 2024/12/3 10:20, Jooyung Han wrote:
> > Hi Gao,
> >
> > I found that in the loop erofs_iget_from_srcpath() is called in
> > different order due to readdir and erofs_iget_from_srcpath() calls
> > erofs_new_inode() which fills i_ino[0] for newly created inode. I
> > think this i_ino[0] having different values caused the difference in
> > the output.
>
> Oh, okay, that makes sense, I think we'd better move
>
> inode->i_ino[0] = sbi->inos++;  /* inode serial number */
>
> to erofs_mkfs_dump_tree()  (since we'd better to leave
> i_ino[0] stable even without dumping from localdir later.)
> and even clean up a bit.
>
> If you don't have more time to clean up this, let's just
> commit a patch to fix this directly.

Sounds good to me ;-)
To be honest, I don't know the stuff well enough for this cleanup.

>
> Thanks,
> Gao Xiang

Thanks,
Jooyung


More information about the Linux-erofs mailing list