]> www.infradead.org Git - mtd-utils.git/commit
fsck.ubifs: rebuild_fs: Add valid nodes into file
authorZhihao Cheng <chengzhihao1@huawei.com>
Mon, 11 Nov 2024 09:01:10 +0000 (17:01 +0800)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Mon, 11 Nov 2024 09:32:46 +0000 (10:32 +0100)
commit9c55da23863daa51a6e95e5a8e3d6f7c0283797f
tree5b02e5cc6313ae6e49495120b3ee9ef622ae4fb1
parenta65c63e7252e69984f61b0cf348dbd5a38729ac6
fsck.ubifs: rebuild_fs: Add valid nodes into file

This is the 3/12 step of rebuilding. Generate file according to left valid
inode nodes and dentry nodes. Based on the results from step 2, it is easy
to understand:

Step 2 has done:
 valid_inos - del_inos = left_inos
 valid_dents - del_dents = left_dents
Step 3 should do:
 Traverse left_inos and left_dents, insert inode/dentry nodes into
 corresponding file.

After that, all files are generated by scanning, the next thing to do is
dropping invalid files(eg. nonconsistent file type between inode node and
dentry nodes, file has no dentry nodes(excepts '/'), encrypted file has
no xattr information, etc.), which will be done in next step.

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