51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
|
From d4d88fe3c9b393e2b21754237104c68a37123aa6 Mon Sep 17 00:00:00 2001
|
||
|
From: Josef Bacik <josef@redhat.com>
|
||
|
Date: Wed, 4 Jan 2012 10:03:33 -0500
|
||
|
Subject: [PATCH 37/43] Btrfs-progs: add some verbose output to find-root
|
||
|
|
||
|
Trying to track down why we can't find roots, add some verbose output so we know
|
||
|
what chunks we're scanning and when we move to new chunks. Thanks,
|
||
|
|
||
|
Signed-off-by: Josef Bacik <josef@redhat.com>
|
||
|
---
|
||
|
find-root.c | 9 +++++++++
|
||
|
1 files changed, 9 insertions(+), 0 deletions(-)
|
||
|
|
||
|
diff --git a/find-root.c b/find-root.c
|
||
|
index f9cb7ed..484f85f 100644
|
||
|
--- a/find-root.c
|
||
|
+++ b/find-root.c
|
||
|
@@ -250,6 +250,10 @@ static int find_root(struct btrfs_root *root)
|
||
|
return ret;
|
||
|
|
||
|
offset = metadata_offset;
|
||
|
+ if (verbose)
|
||
|
+ printf("Checking metadata chunk %Lu, size %Lu\n",
|
||
|
+ metadata_offset, metadata_size);
|
||
|
+
|
||
|
while (1) {
|
||
|
u64 map_length = 4096;
|
||
|
u64 type;
|
||
|
@@ -264,6 +268,8 @@ static int find_root(struct btrfs_root *root)
|
||
|
break;
|
||
|
}
|
||
|
if (offset >= (metadata_offset + metadata_size)) {
|
||
|
+ if (verbose)
|
||
|
+ printf("Moving to the next metadata chunk\n");
|
||
|
err = btrfs_next_metadata(&root->fs_info->mapping_tree,
|
||
|
&metadata_offset,
|
||
|
&metadata_size);
|
||
|
@@ -272,6 +278,9 @@ static int find_root(struct btrfs_root *root)
|
||
|
break;
|
||
|
}
|
||
|
offset = metadata_offset;
|
||
|
+ if (verbose)
|
||
|
+ printf("Checking metadata chunk %Lu, size %Lu"
|
||
|
+ "\n", metadata_offset, metadata_size);
|
||
|
}
|
||
|
mirror_num = 1;
|
||
|
again:
|
||
|
--
|
||
|
1.7.6.233.gd79bc
|
||
|
|