File 0144-Btrfs-progs-print-the-objectid-of-the-root-we-find-w.patch of Package btrfsprogs

From a657103b449bfae0cc67dc9d7153ee19c20d9115 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Wed, 4 Jan 2012 10:50:31 -0500
Subject: [PATCH 41/43] Btrfs-progs: print the objectid of the root we find
 when doing find-root

We need to know if we find a valid fs tree when doing find root, so print the
objectid of the roots we find when we find a tree root.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
---
 find-root.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/find-root.c b/find-root.c
index 43cb778..bc7440a 100644
--- a/find-root.c
+++ b/find-root.c
@@ -138,7 +138,9 @@ static int dump_root_bytenr(struct btrfs_root *root, u64 bytenr, u64 gen)
 
 			offset = btrfs_item_ptr_offset(leaf, slot);
 			read_extent_buffer(leaf, &ri, offset, sizeof(ri));
-			printf("Generation: %Lu Root bytenr: %Lu\n", gen, btrfs_root_bytenr(&ri));
+			printf("Generation: %Lu Root bytenr: %Lu "
+			       "Root objectid: %Lu\n", gen,
+			       btrfs_root_bytenr(&ri), found_key.objectid);
 		}
 		path->slots[0]++;
 	}
-- 
1.7.6.233.gd79bc

openSUSE Build Service is sponsored by