]> asedeno.scripts.mit.edu Git - linux.git/commit
f2fs: check curseg space before foreground GC
authorChao Yu <yuchao0@huawei.com>
Mon, 30 Oct 2017 09:49:54 +0000 (17:49 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 6 Nov 2017 00:42:04 +0000 (16:42 -0800)
commitbf34c93d264509422e9eb11e2dbcea8d8e875efd
tree1c46aea5d501c1965ec7b8b8f2ff178252c946b6
parent3d26fa6be3c487fac7d87dc4a6f02a9ff0f6b1ef
f2fs: check curseg space before foreground GC

When we are closing to trigger foreground GC, if there are only a few
of dirty metas, we can log these dirty metas in left space of opened
segments instead of triggering foreground GC.

With this patch, total count of foreground GC triggered by
test/generic/* of fstest suit reduce from 254 to 184.

So let's do the check before foreground GC anyway.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.h