mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
fsck.f2fs: preserve CP_TRIMMED_FLAG
Let's avoid unnecessary trim. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
92ea71c711
commit
e762de600f
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user