@@ -49,7 +49,7 @@ static void print_extents(struct btrfs_root *root, struct extent_buffer *eb)
return;
}
- size = root->nodesize;
+ size = root->fs_info->nodesize;
nr = btrfs_header_nritems(eb);
for (i = 0; i < nr; i++) {
next = read_tree_block(root, btrfs_node_blockptr(eb, i),
@@ -313,7 +313,7 @@ int cmd_inspect_dump_tree(int argc, char **argv)
if (block_only) {
leaf = read_tree_block(root,
block_only,
- root->nodesize, 0);
+ info->nodesize, 0);
if (extent_buffer_uptodate(leaf) &&
btrfs_header_level(leaf) != 0) {
@@ -324,7 +324,7 @@ int cmd_inspect_dump_tree(int argc, char **argv)
if (!leaf) {
leaf = read_tree_block(root,
block_only,
- root->nodesize, 0);
+ info->nodesize, 0);
}
if (!extent_buffer_uptodate(leaf)) {
error("failed to read %llu",
@@ -441,8 +441,7 @@ again:
read_extent_buffer(leaf, &ri, offset, sizeof(ri));
buf = read_tree_block(tree_root_scan,
btrfs_root_bytenr(&ri),
- tree_root_scan->nodesize,
- 0);
+ info->nodesize, 0);
if (!extent_buffer_uptodate(buf))
goto next;
if (tree_id && found_key.objectid != tree_id) {
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> --- cmds-inspect-dump-tree.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)