From: Jaegeuk Kim Date: Mon, 8 Apr 2013 07:01:00 +0000 (+0900) Subject: f2fs: write checkpoint before starting FG_GC X-Git-Tag: upstream/snapshot3+hdmi~5143^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d64f80473bb58f5c8bfcb63220c31a573a07752f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 83cec8f..37b05e1 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;