diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-03-01 17:09:07 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:35:56 +0200 |
| commit | 7285b4aaf2de590bf69d6954e20a8dabb8d52985 (patch) | |
| tree | 791e68ea9834908cabac9ee5db814be7d76dd9a1 /fs/f2fs/debug.c | |
| parent | 6cbafbd144334616156c48d343ff323837df1fb3 (diff) | |
f2fs: skip scanning free nid bitmap of full NAT blocks
This patch adds to account free nids for each NAT blocks, and while
scanning all free nid bitmap, do check count and skip lookuping in
full NAT block.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Conflicts:
fs/f2fs/node.c
Diffstat (limited to 'fs/f2fs/debug.c')
| -rw-r--r-- | fs/f2fs/debug.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index ba6d2b8aa..dd714ec53 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -196,6 +196,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi) si->base_mem += (NM_I(sbi)->nat_bits_blocks << F2FS_BLKSIZE_BITS); si->base_mem += NM_I(sbi)->nat_blocks * NAT_ENTRY_BITMAP_SIZE; si->base_mem += NM_I(sbi)->nat_blocks / 8; + si->base_mem += NM_I(sbi)->nat_blocks * sizeof(unsigned short); get_cache: si->cache_mem = 0; |
