|
@@ -986,7 +986,13 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
|
|
|
goto next;
|
|
|
|
|
|
sum = page_address(sum_page);
|
|
|
- f2fs_bug_on(sbi, type != GET_SUM_TYPE((&sum->footer)));
|
|
|
+ if (type != GET_SUM_TYPE((&sum->footer))) {
|
|
|
+ f2fs_msg(sbi->sb, KERN_ERR, "Inconsistent segment (%u) "
|
|
|
+ "type [%d, %d] in SSA and SIT",
|
|
|
+ segno, type, GET_SUM_TYPE((&sum->footer)));
|
|
|
+ set_sbi_flag(sbi, SBI_NEED_FSCK);
|
|
|
+ goto next;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* this is to avoid deadlock:
|