]> www.infradead.org Git - mtd-utils.git/commit
fsck.ubifs: rebuild_fs: Check and correct files' information
authorZhihao Cheng <chengzhihao1@huawei.com>
Mon, 11 Nov 2024 09:01:13 +0000 (17:01 +0800)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Mon, 11 Nov 2024 09:32:46 +0000 (10:32 +0100)
commit7ff702596bd5590a93ae55d217753fe4b671c6f4
tree822b879f55e17ab6238ce2f9898e201c8e90215d
parent5292e1cb94d038fe9588038f2bb8282b41efe12f
fsck.ubifs: rebuild_fs: Check and correct files' information

This is the 6/12 step of rebuilding. Correct the file information.
Traverse all files and calculate information (nlink, size, xattr_cnt,
etc.) for each file just like check_leaf() does, correct inode node
based on the calculated information.
Now, all files are consistent, and UBIFS will pass chk_fs after mounting.

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
ubifs-utils/fsck.ubifs/extract_files.c
ubifs-utils/fsck.ubifs/fsck.ubifs.h
ubifs-utils/fsck.ubifs/rebuild_fs.c
ubifs-utils/libubifs/debug.c
ubifs-utils/libubifs/debug.h