diff options
author | David Sterba <dsterba@suse.com> | 2016-10-31 10:59:08 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-09 13:47:29 +0100 |
commit | bcdb7058aad46c6e476d72991839065b2fcaa54d (patch) | |
tree | 1499448f760d16e544e9a783bb41d3828ff6de42 | |
parent | 1fa9cc4991baf58422b3dc45a2c2d3303ea35af1 (diff) |
btrfs-progs: use symbolic tree name when searching
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | btrfs-fragments.c | 2 | ||||
-rw-r--r-- | btrfs-list.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/btrfs-fragments.c b/btrfs-fragments.c index eb75eb7a..46c78d2b 100644 --- a/btrfs-fragments.c +++ b/btrfs-fragments.c @@ -218,7 +218,7 @@ list_fragments(int fd, u64 flags, char *dir) memset(&args, 0, sizeof(args)); - sk->tree_id = 2; + sk->tree_id = BTRFS_EXTENT_TREE_OBJECTID; sk->max_type = -1; sk->min_type = 0; sk->max_objectid = (u64)-1; diff --git a/btrfs-list.c b/btrfs-list.c index eb65110a..89769bc1 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -698,7 +698,7 @@ static u64 find_root_gen(int fd) memset(&args, 0, sizeof(args)); - sk->tree_id = 1; + sk->tree_id = BTRFS_ROOT_TREE_OBJECTID; /* * there may be more than one ROOT_ITEM key if there are @@ -916,7 +916,7 @@ int btrfs_list_get_default_subvolume(int fd, u64 *default_id) * search for a dir item with a name 'default' in the tree of * tree roots, it should point us to a default root */ - sk->tree_id = 1; + sk->tree_id = BTRFS_ROOT_TREE_OBJECTID; /* don't worry about ancient format and request only one item */ sk->nr_items = 1; @@ -980,8 +980,7 @@ static int list_subvol_search(int fd, struct root_lookup *root_lookup) root_lookup_init(root_lookup); memset(&args, 0, sizeof(args)); - /* search in the tree of tree roots */ - sk->tree_id = 1; + sk->tree_id = BTRFS_ROOT_TREE_OBJECTID; /* * set the min and max to backref keys. The search will |