From d530d4d8e237f4d12c93bb76df40b69b8b8a1dcd Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Mon, 5 Oct 2015 22:22:44 +0800 Subject: f2fs: support synchronous gc in ioctl This patch drops in batches gc triggered through ioctl, since user can easily control the gc by designing the loop around the ->ioctl. We support synchronous gc by forcing using FG_GC in f2fs_gc, so with it, user can make sure that in this round all blocks gced were persistent in the device until ioctl returned. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/f2fs/segment.c') diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0ceff28..6b8edf2 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -295,7 +295,7 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi) */ if (has_not_enough_free_secs(sbi, 0)) { mutex_lock(&sbi->gc_mutex); - f2fs_gc(sbi); + f2fs_gc(sbi, false); } } -- cgit v1.1