Skip to content

Commit

Permalink
f2fs: flush dirty nats periodically
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jaegeuk Kim committed May 3, 2017
1 parent 1f43e2a commit 1c0f4bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1c0f4bf

Please sign in to comment.