fsck.f2fs: preserve CP_TRIMMED_FLAG

Let's avoid unnecessary trim.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2019-01-24 20:38:10 -08:00
parent 92ea71c711
commit e762de600f
2 changed files with 4 additions and 0 deletions

View File

@ -2007,6 +2007,8 @@ static void fix_checkpoint(struct f2fs_sb_info *sbi)
orphan_blks = __start_sum_addr(sbi) - 1;
flags |= CP_ORPHAN_PRESENT_FLAG;
}
if (is_set_ckpt_flags(cp, CP_TRIMMED_FLAG))
flags |= CP_TRIMMED_FLAG;
if (is_set_ckpt_flags(cp, CP_DISABLED_FLAG))
flags |= CP_DISABLED_FLAG;

View File

@ -2323,6 +2323,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi)
orphan_blks = __start_sum_addr(sbi) - 1;
flags |= CP_ORPHAN_PRESENT_FLAG;
}
if (is_set_ckpt_flags(cp, CP_TRIMMED_FLAG))
flags |= CP_TRIMMED_FLAG;
if (is_set_ckpt_flags(cp, CP_DISABLED_FLAG))
flags |= CP_DISABLED_FLAG;