erofs-utils: mkfs: make output stable
The iteration order of opendir/readdir depends on filesystem
implementation. Initializng inode->i_ino[0] in the loop causes the
output unstable even though the entries are sorted in
erofs_prepare_dir_file().
In this change, inode->i_ino[0] is initialized in
erofs_prepare_inode_buffer() instead to make the output stable. (not
affected by readdir())
# should generate the same output
Test: mkfs.erofs ... inputdir(ext3)
Test: mkfs.erofs ... inputdir(tmpfs)
Change-Id: I6f975eb8faa0ef1f590835469435ec6a8255d19c
Signed-off-by: Jooyung Han <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gao Xiang <[email protected]>
1 file changed