summaryrefslogtreecommitdiff
path: root/quick-test.c
diff options
context:
space:
mode:
authorGu Jinxiang <gujx@cn.fujitsu.com>2018-01-26 15:26:01 +0800
committerDavid Sterba <dsterba@suse.com>2018-02-02 16:01:57 +0100
commit3809b36d855fd13aad31c3a426a4d7434180003a (patch)
tree842de957ad985ea5a19e4c53e80df6bd5d150f95 /quick-test.c
parent26072f584d347ef2d471c02fbe27dbfedd606ac4 (diff)
btrfs-progs: Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK
Do a cleanup. Also make it consistent with kernel. Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK, since maybe in some situation we do not know root, but just know fs_info. To be consistent with kernel, change macro to inline function. Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'quick-test.c')
-rw-r--r--quick-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quick-test.c b/quick-test.c
index b1e7999d..5da47c32 100644
--- a/quick-test.c
+++ b/quick-test.c
@@ -110,7 +110,7 @@ int main(int ac, char **av) {
printf("node %p level %d total ptrs %d free spc %lu\n", root->node,
btrfs_header_level(root->node),
btrfs_header_nritems(root->node),
- (unsigned long)BTRFS_NODEPTRS_PER_BLOCK(root) -
+ (unsigned long)BTRFS_NODEPTRS_PER_BLOCK(root->fs_info) -
btrfs_header_nritems(root->node));
printf("all searches good, deleting some items\n");
i = 0;