summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-11-07 00:24:46 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-07 00:24:46 +0100
commite5e7ea3c86e56b725e4076e8dc583378abad7697 (patch)
treea45ac759f1fc7391327ebc1dc56e8db00f9a3cc8 /fs/f2fs/segment.c
parentf2fs: introduce the number of inode entries (diff)
downloadlinux-e5e7ea3c86e56b725e4076e8dc583378abad7697.tar.xz
linux-e5e7ea3c86e56b725e4076e8dc583378abad7697.zip
f2fs: control the memory footprint used by ino entries
This patch adds to control the memory footprint used by ino entries. This will conduct best effort, not strictly. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/segment.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 16721b5dffa4..e094675497d8 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -276,7 +276,8 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
{
/* check the # of cached NAT entries and prefree segments */
if (try_to_free_nats(sbi, NAT_ENTRY_PER_BLOCK) ||
- excess_prefree_segs(sbi))
+ excess_prefree_segs(sbi) ||
+ available_free_memory(sbi, INO_ENTRIES))
f2fs_sync_fs(sbi->sb, true);
}