From 34bd20793247de30e712bd411c287c5831f9aa32 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Thu, 18 May 2017 09:17:41 +0800 Subject: btrfs-progs: Refactor block sizes users in ctree.c and ctree.h Signed-off-by: Qu Wenruo --- ctree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctree.h') diff --git a/ctree.h b/ctree.h index 78956a4f..84298c7b 100644 --- a/ctree.h +++ b/ctree.h @@ -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)) -- cgit v1.2.3