* [PATCH] btrfs-progs: print root item's last_snapshot value.
@ 2015-10-07 12:06 Lakshmipathi.G
2015-10-07 15:20 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Lakshmipathi.G @ 2015-10-07 12:06 UTC (permalink / raw)
To: linux-btrfs
Include last_snapshot value in print_root(). With btrfs-debug-tree, it
helps to identify whether its a snapshot-ed subvolume or not.
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
---
print-tree.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/print-tree.c b/print-tree.c
index dc1d276..7ddf400 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -481,12 +481,13 @@ static void print_root(struct extent_buffer *leaf, int slot)
memset(&root_item, 0, sizeof(root_item));
read_extent_buffer(leaf, &root_item, (unsigned long)ri, len);
- printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu\n",
+ printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu lastsnap %llu\n",
(unsigned long long)btrfs_root_bytenr(&root_item),
btrfs_root_level(&root_item),
(unsigned long long)btrfs_root_dirid(&root_item),
btrfs_root_refs(&root_item),
- (unsigned long long)btrfs_root_generation(&root_item));
+ (unsigned long long)btrfs_root_generation(&root_item),
+ (unsigned long long)btrfs_root_last_snapshot(&root_item));
if (root_item.generation == root_item.generation_v2) {
uuid_unparse(root_item.uuid, uuid_str);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-07 15:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 12:06 [PATCH] btrfs-progs: print root item's last_snapshot value Lakshmipathi.G
2015-10-07 15:20 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.