diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 17:01:08 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:45 +0100 |
commit | 022cd74567186eb44478dc371d46427ecfb4380b (patch) | |
tree | e36a4a09074906c787d39d873ca92e239c991cf2 /misc-utils/flash_otp_erase.c | |
parent | eb77d2bace972b4d2b5b2ac70edd2a32e9bc65f9 (diff) |
fsck.ubifs: Add rebuilding filesystem support
Add rebuilding filesystem support. This is the 1/12 step of rebuilding.
Collect files, valid inode nodes, deleted inode nodes, valid dentry
nodes and deleted dentry nodes in kinds of trees by scanning nodes from
flash. Corrupted nodes(eg. incorrect crc, bad inode size, bad dentry
name length, etc.) are dropped during scanning. Larger sqnum node is
picked when more than 1 nodes with same index.
In this step, trun node and data nodes are put into corresponding file,
inode/dentry nodes are put into four trees: valid_inos(nlink != 0),
del_inos(nlink is 0), valid_dents(inum != 0), del_dents(inum is 0).
Next step will process above four trees to deal deletion situations.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'misc-utils/flash_otp_erase.c')
0 files changed, 0 insertions, 0 deletions