mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
f2fs-tools: move_curseg_info only if check_curseg_offset fails
Current design will lose recovery process when check_curseg_offset is OK. Signed-off-by: Yunlong Song <yunlong.song@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
f4078d7e5b
commit
d879e7ebde
@ -2026,9 +2026,11 @@ int fsck_verify(struct f2fs_sb_info *sbi)
|
||||
fix_hard_links(sbi);
|
||||
fix_nat_entries(sbi);
|
||||
rewrite_sit_area_bitmap(sbi);
|
||||
move_curseg_info(sbi, SM_I(sbi)->main_blkaddr);
|
||||
write_curseg_info(sbi);
|
||||
flush_curseg_sit_entries(sbi);
|
||||
if (check_curseg_offset(sbi)) {
|
||||
move_curseg_info(sbi, SM_I(sbi)->main_blkaddr);
|
||||
write_curseg_info(sbi);
|
||||
flush_curseg_sit_entries(sbi);
|
||||
}
|
||||
fix_checkpoint(sbi);
|
||||
} else if (is_set_ckpt_flags(cp, CP_FSCK_FLAG)) {
|
||||
write_checkpoint(sbi);
|
||||
|
Loading…
Reference in New Issue
Block a user