f2fs: support synchronous gc in ioctl
authorChao Yu <chao2.yu@samsung.com>
Mon, 5 Oct 2015 14:22:44 +0000 (22:22 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 9 Oct 2015 23:20:56 +0000 (16:20 -0700)
commitd530d4d8e237f4d12c93bb76df40b69b8b8a1dcd
treea4496eb0dd00eef9caa6b190790502d91f847ff0
parent3342bb303bf48dd8bb5ac94c3356489ff53e4d04
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 <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/gc.h
fs/f2fs/segment.c