提交 d64f8047 编写于 作者: J Jaegeuk Kim

f2fs: write checkpoint before starting FG_GC

In order to be aware of prefree and free sections during FG_GC, let's start with
write_checkpoint().
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 3315101f
...@@ -669,8 +669,10 @@ int f2fs_gc(struct f2fs_sb_info *sbi) ...@@ -669,8 +669,10 @@ int f2fs_gc(struct f2fs_sb_info *sbi)
if (!(sbi->sb->s_flags & MS_ACTIVE)) if (!(sbi->sb->s_flags & MS_ACTIVE))
goto stop; goto stop;
if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) {
gc_type = FG_GC; gc_type = FG_GC;
write_checkpoint(sbi, false);
}
if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE)) if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE))
goto stop; goto stop;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册