mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
9dc956b2c8
commit
e15d54d500
3 changed files with 3 additions and 7 deletions
|
@ -304,11 +304,6 @@ struct f2fs_node {
|
|||
* For NAT entries
|
||||
*/
|
||||
#define NAT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_nat_entry))
|
||||
#define NAT_ENTRY_BITMAP_SIZE ((NAT_ENTRY_PER_BLOCK + 7) / 8)
|
||||
#define NAT_ENTRY_BITMAP_SIZE_ALIGNED \
|
||||
((NAT_ENTRY_BITMAP_SIZE + BITS_PER_LONG - 1) / \
|
||||
BITS_PER_LONG * BITS_PER_LONG)
|
||||
|
||||
|
||||
struct f2fs_nat_entry {
|
||||
__u8 version; /* latest version of cached nat entry */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue