btrfsprogs/0139-Btrfs-progs-make-find-root-spit-out-the-size-of-the-.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

35 lines
1.1 KiB
Diff

From b36b23becb0d79faefd38da11b684a78b95243c9 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Wed, 4 Jan 2012 09:56:06 -0500
Subject: [PATCH 36/43] Btrfs-progs: make find root spit out the size of the
disk
In order to figure out what exactly is broken on a fs we need to spit out the
current offset we are on and the size of the fs to know if the super is wrong
and we just need to ignore it, or if the offset we got is bad and we should just
keep searching. 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 e0bc069..f9cb7ed 100644
--- a/find-root.c
+++ b/find-root.c
@@ -258,7 +258,9 @@ static int find_root(struct btrfs_root *root)
if (offset >
btrfs_super_total_bytes(&root->fs_info->super_copy)) {
- printf("Went past the fs size, exiting");
+ printf("Went past the fs size, exiting, offset=%Lu, "
+ "total_bytes=%Lu\n", offset,
+ btrfs_super_total_bytes(&root->fs_info->super_copy));
break;
}
if (offset >= (metadata_offset + metadata_size)) {
--
1.7.6.233.gd79bc