summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-05-02 04:09:44 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2017-05-03 20:04:56 +0300
commit1c0f4bf5c3df13da4090a602c377f7d7a3708ce8 (patch)
tree9d7bd49155de7ca01452956adea8b95000d70e65 /fs/f2fs/segment.c
parent1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9 (diff)
downloadlinux-1c0f4bf5c3df13da4090a602c377f7d7a3708ce8.tar.xz
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 <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a32268eeb472..6e1c8cf75749 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 */