Skip to contentSkip to conversation

Btrfs-progs: add_refs_for_implied: Use root_id instead of root_bytenr.

PATCH New Chandan Rajendra 1 participant 1 message Nov 27, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs-progs: add_refs_for_implied: Use root_id instead of root_bytenr.

resolve_one_root() returns the objectid of a tree rather than the logical address of the root node. Hence using root_bytenr is misleading. Fix this.

---
 qgroup-verify.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qgroup-verify.c +2 -2
index c0c61d0..c98c751 100644
@@ -553,11 +553,11 @@ static int add_refs_for_implied(struct btrfs_fs_info *info, u64 bytenr,
 				struct tree_block *block)
 {
 	int ret;
-	u64 root_bytenr = resolve_one_root(bytenr);
+	u64 root_id = resolve_one_root(bytenr);
 	struct btrfs_root *root;
 	struct btrfs_key key;
 
-	key.objectid = root_bytenr;
+	key.objectid = root_id;
 	key.type = BTRFS_ROOT_ITEM_KEY;
 	key.offset = (u64)-1;
 
Signature · 1 line
2.1.0