diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-02 15:24:24 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:33:44 +0200 |
| commit | d8a895984e4de73fcbc4addeec2f39e80633f96c (patch) | |
| tree | b9753b9c4b8df35076cdca1eba946552628038f5 /fs/f2fs/segment.c | |
| parent | 6c333eebdd9a955a8411f0586c66d954b2711f7a (diff) | |
f2fs: control not to exceed # of cached nat entries
This is to avoid cache entry management overhead including radix tree.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
| -rw-r--r-- | fs/f2fs/segment.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0406ca0e9..0b059c783 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -404,6 +404,11 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) { if (!need) return; + + /* balance_fs_bg is able to be pending */ + if (excess_cached_nats(sbi)) + f2fs_balance_fs_bg(sbi); + /* * We should do GC or end up with checkpoint, if there are so many dirty * dir/node pages without enough free segments. |
