summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Malevich <jam@daterainc.com>2015-02-02 19:38:27 -0800
committerJacob Malevich <jam@daterainc.com>2015-02-02 19:38:27 -0800
commit16d5881badb3b4532aa27703bdc25c3746995d50 (patch)
treec30a27486cdae2617091326cae5b1e01c92c2b6d
parent3fa318e8b7103487ae0fe9b74e9629f6391b166b (diff)
bcacheadm: print more info in query_dev
Also display the internal cacheset uuid for each dev, stored in the superblock. As well as the dev uuid stored in the struct member_info. Signed-off-by: Jacob Malevich <jam@daterainc.com> Issue DAT-1913 Change-Id: Ib9815a023b0791c54ffde573fda1e9911d757c34
-rw-r--r--bcache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bcache.c b/bcache.c
index fe21483..d0cf7c9 100644
--- a/bcache.c
+++ b/bcache.c
@@ -835,6 +835,10 @@ static void show_super_common(struct cache_sb *sb, bool force_csum)
uuid_unparse(sb->user_uuid.b, uuid);
printf("cset.uuid\t\t%s\n", uuid);
+
+ uuid_unparse(sb->set_uuid.b, uuid);
+ printf("internal.uuid\t%s\n", uuid);
+
}
void show_super_backingdev(struct cache_sb *sb, bool force_csum)
@@ -860,9 +864,13 @@ void show_super_backingdev(struct cache_sb *sb, bool force_csum)
void show_super_cache(struct cache_sb *sb, bool force_csum)
{
struct cache_member *m = sb->members + sb->nr_this_dev;
+ char uuid[16];
show_super_common(sb, force_csum);
+ uuid_unparse(m->uuid.b, uuid);
+ printf("dev.cache.uuid\t%s\n", uuid);
+
printf("dev.sectors_per_block\t%u\n"
"dev.sectors_per_bucket\t%u\n",
sb->block_size,