diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-05-01 18:09:44 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:43:41 +0200 |
| commit | ce5c5be155d4fad6cfa1b1c551eb995c3d2621ea (patch) | |
| tree | 866141e7b1a813d07e5a35ca7fcab1864404a85d | |
| parent | 8bcbffcfc462feb16e46fd61f919cef49c7dc219 (diff) | |
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>
| -rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index ab052a894..26fc1c914 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -478,7 +478,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 */ |
