From 4660f9c0fe484353b17a4b9d1cc2b036fa895f76 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 24 Oct 2013 14:19:18 +0900 Subject: f2fs: introduce f2fs_balance_fs_bg for some background jobs This patch merges some background jobs into this new function. Signed-off-by: Changman Lee Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/f2fs/gc.c') diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 783c6cc6253c..b7ad1ec7e4cc 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -83,9 +83,8 @@ static int gc_thread_func(void *data) if (f2fs_gc(sbi)) wait_ms = gc_th->no_gc_sleep_time; - /* balancing prefree segments */ - if (excess_prefree_segs(sbi)) - f2fs_sync_fs(sbi->sb, true); + /* balancing f2fs's metadata periodically */ + f2fs_balance_fs_bg(sbi); } while (!kthread_should_stop()); return 0; -- cgit v1.2.2