[PATCH v2 1/2] erofs-utils: sort shared xattr

Gao Xiang hsiangkao at linux.alibaba.com
Wed Dec 15 14:22:28 AEDT 2021


On Wed, Dec 15, 2021 at 10:43:40AM +0800, Huang Jianan via Linux-erofs wrote:
> Hi Xiang,
> 
> 在 2021/12/14 23:31, Gao Xiang 写道:
> > Hi Jianan,
> > 
> > On Tue, Dec 14, 2021 at 05:52:01PM +0800, Huang Jianan via Linux-erofs wrote:
> > > Sort shared xattr before writing to disk to ensure the consistency
> > > of reproducible builds.
> > > 
> > > Signed-off-by: Huang Jianan <huangjianan at oppo.com>
> > I still fail to understand why the order of shared xattrs will be
> > a problem of reproducible builds.
> > 
> > IOWs, if the order of shared xattrs is really a problem, do we need
> > to sort inline xattrs as well? Or do you have some reproducer to
> > show why the order of shared xattrs can be changed if the filesystem
> > of srcdir isn't changed?
> We discovered this problem when we built the same image content on
> different machines.
> 
> After executing readdir, the order of the subdirectories returned by the
> two machines is different, which leads to a difference in the order of
> shared
> xattr. I'm not sure if this scene can be called reproducible build in the
> strict
> sense.
> 
> In addition, since the problem is caused by the readdir sequence, it should
> have no effect on inline xattr.

So it sounds like we need to optimize xattr readdir process instead?

Thanks,
Gao Xiang

> 
> Thanks,
> Jianan
> > Thanks,
> > Gao Xiang
> > 


More information about the Linux-erofs mailing list