aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-11-06 15:16:04 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-06 15:17:43 -0800
commit8c402946f0743af91d22eca31d98b058b3371054 (patch)
tree97b15edaafd72a6b86352e0356829715b4b7f090 /fs/f2fs/debug.c
parentf2fs: disable roll-forward when active_logs = 2 (diff)
downloadlinux-dev-8c402946f0743af91d22eca31d98b058b3371054.tar.xz
linux-dev-8c402946f0743af91d22eca31d98b058b3371054.zip
f2fs: introduce the number of inode entries
This patch adds to monitor the number of ino entries. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r--fs/f2fs/debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 86e6e926278d..74a0d78dbd3e 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -119,6 +119,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
{
struct f2fs_stat_info *si = F2FS_STAT(sbi);
unsigned npages;
+ int i;
if (si->base_mem)
goto get_cache;
@@ -168,8 +169,9 @@ get_cache:
si->cache_mem += npages << PAGE_CACHE_SHIFT;
npages = META_MAPPING(sbi)->nrpages;
si->cache_mem += npages << PAGE_CACHE_SHIFT;
- si->cache_mem += sbi->n_orphans * sizeof(struct ino_entry);
si->cache_mem += sbi->n_dirty_dirs * sizeof(struct dir_inode_entry);
+ for (i = 0; i <= UPDATE_INO; i++)
+ si->cache_mem += sbi->ino_num[i] * sizeof(struct ino_entry);
}
static int stat_show(struct seq_file *s, void *v)