btrfsprogs/0140-Btrfs-progs-add-some-verbose-output-to-find-root.patch
Stephan Kulow c3a893d519 Accepting request 108879 from filesystems
- place binaries in /usr tree (UsrMerge project)
- adjust mkinitrd script accordingly

- add btrfsck repair options for:
  - rebuild extent records
  - fix block group accounting
  - reset csums for rescue nodatasum mount
  - prune corrupt extent allocation tree blocks
- device scanning fixes for dm and multipath
- initrd support: move btrfs device scan after block device setup
- documentation updates
- add csize for file commpressed size
- updated restore utility

OBS-URL: https://build.opensuse.org/request/show/108879
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=26
2012-03-20 10:26:08 +00:00

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