{ "CHUNK", BTRFS_CHUNK_TREE_OBJECTID },
{ "DEVICE", BTRFS_DEV_TREE_OBJECTID },
{ "DEV", BTRFS_DEV_TREE_OBJECTID },
- { "FS_TREE", BTRFS_FS_TREE_OBJECTID },
+ { "FS", BTRFS_FS_TREE_OBJECTID },
{ "CSUM", BTRFS_CSUM_TREE_OBJECTID },
{ "CHECKSUM", BTRFS_CSUM_TREE_OBJECTID },
{ "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },
"-u|--uuid print only the uuid tree",
"-b|--block <block_num> print info from the specified block only",
"-t|--tree <tree_id> print only tree with the given id (string or number)",
+ "--follow use with -b, to show all children tree blocks of <block_num>",
NULL
};
u64 block_only = 0;
struct btrfs_root *tree_root_scan;
u64 tree_id = 0;
+ bool follow = false;
while (1) {
int c;
+ enum { GETOPT_VAL_FOLLOW = 256 };
static const struct option long_options[] = {
{ "extents", no_argument, NULL, 'e'},
{ "device", no_argument, NULL, 'd'},
{ "uuid", no_argument, NULL, 'u'},
{ "block", required_argument, NULL, 'b'},
{ "tree", required_argument, NULL, 't'},
+ { "follow", no_argument, NULL, GETOPT_VAL_FOLLOW },
{ NULL, 0, NULL, 0 }
};
}
break;
}
+ case GETOPT_VAL_FOLLOW:
+ follow = true;
+ break;
default:
usage(cmd_inspect_dump_tree_usage);
}
(unsigned long long)block_only);
goto close_root;
}
- btrfs_print_tree(root, leaf, 0);
+ btrfs_print_tree(root, leaf, follow);
free_extent_buffer(leaf);
goto close_root;
}