diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-05-18 09:17:41 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-07-03 13:35:10 +0200 |
commit | 34bd20793247de30e712bd411c287c5831f9aa32 (patch) | |
tree | 1afe0b413cc09e19f1b4583e56b23cbdd09e8013 /ctree.h | |
parent | 3d5eadd63383db1c83dd849ac08190856120868f (diff) |
btrfs-progs: Refactor block sizes users in ctree.c and ctree.h
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Diffstat (limited to 'ctree.h')
-rw-r--r-- | ctree.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -352,11 +352,11 @@ struct btrfs_header { u8 level; } __attribute__ ((__packed__)); -#define BTRFS_NODEPTRS_PER_BLOCK(r) (((r)->nodesize - \ +#define BTRFS_NODEPTRS_PER_BLOCK(r) (((r)->fs_info->nodesize - \ sizeof(struct btrfs_header)) / \ sizeof(struct btrfs_key_ptr)) #define __BTRFS_LEAF_DATA_SIZE(bs) ((bs) - sizeof(struct btrfs_header)) -#define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->nodesize)) +#define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->fs_info->nodesize)) #define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) - \ sizeof(struct btrfs_file_extent_item)) |