Skip to content

Commit

Permalink
f2fs: fix to show ino management cache size correctly
Browse files Browse the repository at this point in the history
It needs to stat size of ino management cache with all type instead of
orphan ino type.

Fixes: 652be55 ("f2fs: show # of orphan inodes")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Oct 10, 2017
1 parent 3f06252 commit b77061b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
si->cache_mem += NM_I(sbi)->dirty_nat_cnt *
sizeof(struct nat_entry_set);
si->cache_mem += si->inmem_pages * sizeof(struct inmem_pages);
for (i = 0; i <= ORPHAN_INO; i++)
for (i = 0; i < MAX_INO_ENTRY; i++)
si->cache_mem += sbi->im[i].ino_num * sizeof(struct ino_entry);
si->cache_mem += atomic_read(&sbi->total_ext_tree) *
sizeof(struct extent_tree);
Expand Down

0 comments on commit b77061b

Please sign in to comment.