diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-03-01 17:09:07 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-20 10:00:17 -0400 |
commit | 586d1492f301982e349797cfb05d9f343002ffa2 (patch) | |
tree | 13371030fa0c79ad4862b004d5302f5f1c4c365a /fs/f2fs/f2fs.h | |
parent | 23380b8568b85cd4b7a056891f4dbf131f7b871d (diff) | |
download | linux-586d1492f301982e349797cfb05d9f343002ffa2.tar.bz2 |
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>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index e849f83d6114..0a6e115562f6 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -561,6 +561,8 @@ struct f2fs_nm_info { struct mutex build_lock; /* lock for build free nids */ unsigned char (*free_nid_bitmap)[NAT_ENTRY_BITMAP_SIZE]; unsigned char *nat_block_bitmap; + unsigned short *free_nid_count; /* free nid count of NAT block */ + spinlock_t free_nid_lock; /* protect updating of nid count */ /* for checkpoint */ char *nat_bitmap; /* NAT bitmap pointer */ |