diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-12 00:12:56 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-12 00:12:56 -0900 |
commit | 743761bb2e0b887d03262b949cb100ba23d3af0a (patch) | |
tree | 442ccb3358941687d2f75feee0efb1d37e996cf6 | |
parent | 69973b830859bc6529a7a0468ba0d80ee5117826 (diff) |
bcache: dump uuids on cache set register
-rw-r--r-- | drivers/md/bcache/super.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 849ad441cd76..d09341ee3a6b 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -376,6 +376,7 @@ static void uuid_io(struct cache_set *c, int op, unsigned long op_flags, static char *uuid_read(struct cache_set *c, struct jset *j, struct closure *cl) { struct bkey *k = &j->uuid_bucket; + unsigned i; if (__bch_btree_ptr_invalid(c, k)) return "bad uuid pointer"; @@ -411,6 +412,19 @@ static char *uuid_read(struct cache_set *c, struct jset *j, struct closure *cl) } } + pr_info("attached devices:"); + for (i = 0; i < c->nr_uuids; i++) { + struct uuid_entry *u = c->uuids + i; + + pr_info("[%.2u] uuid: %pU", i, u->uuid); + pr_info("[%.2u] label: %s", i, u->label); + pr_info("[%.2u] first_reg: %u", i, u->first_reg); + pr_info("[%.2u] last_reg: %u", i, u->last_reg); + pr_info("[%.2u] invalidated: %u", i, u->invalidated); + pr_info("[%.2u] flags: %u", i, u->flags); + pr_info("[%.2u] sectors: %llu", i, u->sectors); + } + return NULL; } |