OSDN Git Service

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>
Thu, 16 Nov 2017 06:02:26 +0000 (22:02 -0800)
commit42c7c71824fc026f8d0ed1c2261680752ba7ffa4
tree639637e51a8f0c6a18b920dd0fe9ba69f1b26b16
parentc5470498e59be4c3d9ebc9d7ee396dd8e6c6b1ea
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