diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-03-18 09:25:05 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-21 22:34:36 -0400 |
commit | 70874fb34fbd8b34b1aa45b30ca7eb216b1376d4 (patch) | |
tree | 09d333853ae50203b1c82d65c67cf9fd7ed8a9c1 /fs/f2fs/debug.c | |
parent | 684ca7e55de1f3defb13c491e0b5eb8f27ffe79c (diff) | |
download | linux-70874fb34fbd8b34b1aa45b30ca7eb216b1376d4.tar.bz2 |
f2fs: calculate the f2fs_stat_info into base_mem
The memory size of f2fs_stat_info also should be calculated.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index ee2d0a485fc3..ef1179df05d9 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -156,7 +156,11 @@ static void update_mem_info(struct f2fs_sb_info *sbi) if (si->base_mem) goto get_cache; - si->base_mem = sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize; + /* build stat */ + si->base_mem = sizeof(struct f2fs_stat_info); + + /* build superblock */ + si->base_mem += sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize; si->base_mem += 2 * sizeof(struct f2fs_inode_info); si->base_mem += sizeof(*sbi->ckpt); si->base_mem += sizeof(struct percpu_counter) * NR_COUNT_TYPE; |