diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-03-09 20:42:28 -0500 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-03-17 00:57:39 -0400 |
| commit | bb1105e479fbb8b0edc6f35affec71b75e31c8c0 (patch) | |
| tree | 782efd263f26e6dfd3305fdccf2070acf82113f8 /include/linux | |
| parent | c56675750d7c45ce6cc21a67770629aaf41d1491 (diff) | |
f2fs: align memory boundary for bitops
For example, in arm64, free_nid_bitmap should be aligned to word size in order
to use bit operations.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/f2fs_fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 124787e8db58..aa5db8b5521a 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h | |||
| @@ -305,6 +305,10 @@ struct f2fs_node { | |||
| 305 | */ | 305 | */ |
| 306 | #define NAT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_nat_entry)) | 306 | #define NAT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_nat_entry)) |
| 307 | #define NAT_ENTRY_BITMAP_SIZE ((NAT_ENTRY_PER_BLOCK + 7) / 8) | 307 | #define NAT_ENTRY_BITMAP_SIZE ((NAT_ENTRY_PER_BLOCK + 7) / 8) |
| 308 | #define NAT_ENTRY_BITMAP_SIZE_ALIGNED \ | ||
| 309 | ((NAT_ENTRY_BITMAP_SIZE + BITS_PER_LONG - 1) / \ | ||
| 310 | BITS_PER_LONG * BITS_PER_LONG) | ||
| 311 | |||
| 308 | 312 | ||
| 309 | struct f2fs_nat_entry { | 313 | struct f2fs_nat_entry { |
| 310 | __u8 version; /* latest version of cached nat entry */ | 314 | __u8 version; /* latest version of cached nat entry */ |
