fsck.f2fs: no need to fix SIT type for COLD_DATA

If hot or warm data blocks were moved to the cold log, we should remain them
in the cold log.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2014-11-24 17:43:44 -08:00
parent 370a24287e
commit b76cced47e

View File

@ -1007,9 +1007,13 @@ int check_sit_types(struct f2fs_sb_info *sbi)
se = get_seg_entry(sbi, i);
if (se->orig_type != se->type) {
FIX_MSG("Wrong segment type [0x%x] %x -> %x",
i, se->orig_type, se->type);
err = -EINVAL;
if (se->orig_type == CURSEG_COLD_DATA) {
se->type = se->orig_type;
} else {
FIX_MSG("Wrong segment type [0x%x] %x -> %x",
i, se->orig_type, se->type);
err = -EINVAL;
}
}
}
return err;