summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-04-08 09:01:00 +0200
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-04-09 11:21:24 +0200
commitd64f80473bb58f5c8bfcb63220c31a573a07752f (patch)
treebbbe391a029a04b9f0ab3cf2ad16ac99096d6de6 /fs/f2fs/gc.c
parentf2fs: fix the logic of IS_DNODE() (diff)
downloadlinux-d64f80473bb58f5c8bfcb63220c31a573a07752f.tar.xz
linux-d64f80473bb58f5c8bfcb63220c31a573a07752f.zip
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: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 83cec8f868c6..37b05e1c574c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -669,8 +669,10 @@ gc_more:
if (!(sbi->sb->s_flags & MS_ACTIVE))
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;
+ write_checkpoint(sbi, false);
+ }
if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE))
goto stop;