f2fs: avoid BG_GC in f2fs_balance_fs
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 15 Nov 2016 01:38:35 +0000 (17:38 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 25 Nov 2016 18:15:57 +0000 (10:15 -0800)
commit7702bdbe505a22380dd958e2ee35124c7c414806
tree8dc084fff9df8d1330389b877514977b7eb97ecf
parentc040ff9d69fd1d782fe577ba9e35c1f5798158ae
f2fs: avoid BG_GC in f2fs_balance_fs

If many threads hit has_not_enough_free_secs() in f2fs_balance_fs() at the same
time, all the threads would do FG_GC or BG_GC.
In this critical path, we totally don't need to do BG_GC at all.
Let's avoid that.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/segment.c