From b36b23becb0d79faefd38da11b684a78b95243c9 Mon Sep 17 00:00:00 2001 From: Josef Bacik 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 --- 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