diff options
author | Huang Xiaojia <huangxiaojia2@huawei.com> | 2024-11-11 17:08:14 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:46 +0100 |
commit | fda7068da735d3e574bc46b70d3af62a5db8e908 (patch) | |
tree | 69d9e10d411a291305da3542ea644a35c50aec7f /ubifs-utils/fsck.ubifs/fsck.ubifs.h | |
parent | b064a78fb9a9503a4bf87a5149ca8fe5711b2cff (diff) |
fsck.ubifs: Check and create the lost+found
This is the 16/18 step of fsck. Check whether the lost+found is existed,
create a new one if it is not found. This step makes sure that disconnected
file can be recovered under the lost+found.
Signed-off-by: Huang Xiaojia <huangxiaojia2@huawei.com>
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ubifs-utils/fsck.ubifs/fsck.ubifs.h b/ubifs-utils/fsck.ubifs/fsck.ubifs.h index fb7ccca..0e2a081 100644 --- a/ubifs-utils/fsck.ubifs/fsck.ubifs.h +++ b/ubifs-utils/fsck.ubifs/fsck.ubifs.h @@ -277,6 +277,7 @@ struct ubifs_rebuild_info { * @lpts: lprops table * @try_rebuild: %true means that try to rebuild fs when fsck failed * @rebuild: rebuilding-related information + * @lost_and_found: inode number of the lost+found directory, %0 means invalid */ struct ubifs_fsck_info { int mode; @@ -288,6 +289,7 @@ struct ubifs_fsck_info { struct ubifs_lprops *lpts; bool try_rebuild; struct ubifs_rebuild_info *rebuild; + ino_t lost_and_found; }; #define FSCK(c) ((struct ubifs_fsck_info*)c->private) @@ -383,4 +385,7 @@ int build_lpt(struct ubifs_info *c, calculate_lp_callback calculate_lp_cb, int check_and_correct_space(struct ubifs_info *c); int check_and_correct_index_size(struct ubifs_info *c); +/* handle_disconnected.c */ +int check_and_create_lost_found(struct ubifs_info *c); + #endif |