diff options
author | Yunlei He <heyunlei@huawei.com> | 2018-06-27 02:46:21 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-07-28 21:23:26 -0400 |
commit | e15d54d5009688ccb2a5312f3b70d631615329c9 (patch) | |
tree | f8e2e2554de500ce33417b413621519002fab722 /fs/f2fs/debug.c | |
parent | 9dc956b2c8523aed39d1e6508438be9fea28c8fc (diff) |
f2fs: Allocate and stat mem used by free nid bitmap more accurately
This patch used f2fs_bitmap_size macro to calculate mem used by
free nid bitmap, and stat used mem including aligned part.
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 2d65e77ae5cf..214a968962a1 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -215,7 +215,8 @@ static void update_mem_info(struct f2fs_sb_info *sbi) | |||
215 | si->base_mem += sizeof(struct f2fs_nm_info); | 215 | si->base_mem += sizeof(struct f2fs_nm_info); |
216 | si->base_mem += __bitmap_size(sbi, NAT_BITMAP); | 216 | si->base_mem += __bitmap_size(sbi, NAT_BITMAP); |
217 | si->base_mem += (NM_I(sbi)->nat_bits_blocks << F2FS_BLKSIZE_BITS); | 217 | si->base_mem += (NM_I(sbi)->nat_bits_blocks << F2FS_BLKSIZE_BITS); |
218 | si->base_mem += NM_I(sbi)->nat_blocks * NAT_ENTRY_BITMAP_SIZE; | 218 | si->base_mem += NM_I(sbi)->nat_blocks * |
219 | f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK); | ||
219 | si->base_mem += NM_I(sbi)->nat_blocks / 8; | 220 | si->base_mem += NM_I(sbi)->nat_blocks / 8; |
220 | si->base_mem += NM_I(sbi)->nat_blocks * sizeof(unsigned short); | 221 | si->base_mem += NM_I(sbi)->nat_blocks * sizeof(unsigned short); |
221 | 222 | ||