#include "disk-io.h"
#include "commands.h"
#include "btrfs-list.h"
-#include "cmds-inspect-dump-tree.h"
-#include "cmds-inspect-dump-super.h"
-#include "cmds-inspect-tree-stats.h"
+#include "help.h"
static const char * const inspect_cmd_group_usage[] = {
"btrfs inspect-internal <command> <args>",
if (check_argc_exact(argc - optind, 2))
usage(cmd_inspect_logical_resolve_usage);
- size = min(size, (u64)64 * 1024);
+ size = min(size, (u64)SZ_64K);
inodes = malloc(size);
if (!inodes)
return 1;
if (check_argc_exact(argc - optind, 1))
usage(cmd_inspect_rootid_usage);
- fd = btrfs_open_dir(argv[optind], &dirstream, 1);
+ fd = btrfs_open_file_or_dir(argv[optind], &dirstream, 1);
if (fd < 0) {
ret = -ENOENT;
goto out;
}
- ret = lookup_ino_rootid(fd, &rootid);
+ ret = lookup_path_rootid(fd, &rootid);
if (ret) {
error("failed to lookup root id: %s", strerror(-ret));
goto out;
* chunk tree, so often this can lead to the need of allocating
* a new system chunk too, which has a maximum size of 32Mb.
*/
- *min_size += 32 * 1024 * 1024;
+ *min_size += SZ_32M;
}
}
* possibility of deprecating/removing it has been discussed, so we
* ignore it here.
*/
- u64 min_size = 1 * 1024 * 1024ull;
+ u64 min_size = SZ_1M;
struct btrfs_ioctl_search_args args;
struct btrfs_ioctl_search_key *sk = &args.key;
u64 last_pos = (u64)-1;