diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 17:08:01 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:46 +0100 |
commit | 0d1cc10378c2a8f800ff78d79c93b39485d6ca14 (patch) | |
tree | d4a840af01f202d6a515e06de60a4dda7095763f /ubifs-utils/fsck.ubifs/fsck.ubifs.h | |
parent | 7e9a7ceaa9d3851963f92f99ce012f7cd99e742b (diff) |
fsck.ubifs: Traverse TNC and construct files
This is the 6/18 step of fsck. Traverse TNC and construct files. There
could be following steps and possible errors:
Step 1. Traverse TNC, check whether the leaf node is valid, remove invalid
nodes, construct file for valid node and insert file into file tree.
a. corrupted node searched from TNC: remove corresponding TNC branch for
danger mode and normal mode with 'yes' answer, other modes will exit.
b. corrupted index node read from TNC: danger mode with rebuild_fs and
normal mode with 'yes' answer will turn to rebuild filesystem, other
modes will exit.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/fsck.ubifs/fsck.ubifs.h')
-rw-r--r-- | ubifs-utils/fsck.ubifs/fsck.ubifs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ubifs-utils/fsck.ubifs/fsck.ubifs.h b/ubifs-utils/fsck.ubifs/fsck.ubifs.h index db43ccc..4fa4088 100644 --- a/ubifs-utils/fsck.ubifs/fsck.ubifs.h +++ b/ubifs-utils/fsck.ubifs/fsck.ubifs.h @@ -38,7 +38,8 @@ enum { NORMAL_MODE = 0, SAFE_MODE, DANGER_MODE0, /* Types of inconsistent problems */ enum { SB_CORRUPTED = 0, MST_CORRUPTED, LOG_CORRUPTED, BUD_CORRUPTED, - TNC_CORRUPTED, TNC_DATA_CORRUPTED, ORPHAN_CORRUPTED }; + TNC_CORRUPTED, TNC_DATA_CORRUPTED, ORPHAN_CORRUPTED, INVALID_INO_NODE, + INVALID_DENT_NODE, INVALID_DATA_NODE }; enum { HAS_DATA_CORRUPTED = 1, HAS_TNC_CORRUPTED = 2 }; @@ -294,4 +295,7 @@ int check_and_correct_files(struct ubifs_info *c); /* rebuild_fs.c */ int ubifs_rebuild_filesystem(struct ubifs_info *c); +/* check_files.c */ +int traverse_tnc_and_construct_files(struct ubifs_info *c); + #endif |