btrfsprogs/0144-Btrfs-progs-print-the-objectid-of-the-root-we-find-w.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

33 lines
1.1 KiB
Diff

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