From: Jaegeuk Kim Date: Tue, 2 May 2017 01:09:44 +0000 (-0700) Subject: f2fs: flush dirty nats periodically X-Git-Tag: v4.12-rc1~71^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c0f4bf5c3df13da4090a602c377f7d7a3708ce8;p=thirdparty%2Fkernel%2Flinux.git f2fs: flush dirty nats periodically This patch flushes dirty nats in order to acquire available nids by writing checkpoint. Otherwise, we can have no chance to get freed nids. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a32268eeb4727..6e1c8cf757491 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -419,7 +419,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi) else build_free_nids(sbi, false, false); - if (!is_idle(sbi)) + if (!is_idle(sbi) && !excess_dirty_nats(sbi)) return; /* checkpoint is the only way to shrink partial cached entries */