From b76cced47e65e78e6da808b841b507ef82e90777 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 24 Nov 2014 17:43:44 -0800 Subject: [PATCH] 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 --- fsck/fsck.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index f7309d6..09bb26f 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -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;