summaryrefslogtreecommitdiff
path: root/libbcache/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-10-03 19:22:17 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-02-28 03:05:38 -0900
commita5b5eba7f788bb77cf57f9c94f3474a2d439ab0b (patch)
tree278813d1b1a9024174531376d41a2ba04a3b27f6 /libbcache/debug.c
parente4d1c93d85a5b86c04599bfc9f658308d741fd41 (diff)
New on disk format - encryption
Diffstat (limited to 'libbcache/debug.c')
-rw-r--r--libbcache/debug.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libbcache/debug.c b/libbcache/debug.c
index 39f5550e..d25c32ae 100644
--- a/libbcache/debug.c
+++ b/libbcache/debug.c
@@ -96,7 +96,7 @@ void __bch_btree_verify(struct cache_set *c, struct btree *b)
if (inmemory->u64s != sorted->u64s ||
memcmp(inmemory->start,
sorted->start,
- (void *) bset_bkey_last(inmemory) - (void *) inmemory->start)) {
+ vstruct_end(inmemory) - (void *) inmemory->start)) {
unsigned offset = 0, sectors;
struct bset *i;
unsigned j;
@@ -112,18 +112,14 @@ void __bch_btree_verify(struct cache_set *c, struct btree *b)
while (offset < b->written) {
if (!offset ) {
i = &n_ondisk->keys;
- sectors = __set_blocks(n_ondisk,
- le16_to_cpu(n_ondisk->keys.u64s),
- block_bytes(c)) <<
+ sectors = vstruct_blocks(n_ondisk, c->block_bits) <<
c->block_bits;
} else {
struct btree_node_entry *bne =
(void *) n_ondisk + (offset << 9);
i = &bne->keys;
- sectors = __set_blocks(bne,
- le16_to_cpu(bne->keys.u64s),
- block_bytes(c)) <<
+ sectors = vstruct_blocks(bne, c->block_bits) <<
c->block_bits;
}
@@ -427,7 +423,7 @@ void bch_debug_init_cache_set(struct cache_set *c)
if (IS_ERR_OR_NULL(bch_debug))
return;
- snprintf(name, sizeof(name), "%pU", c->disk_sb.user_uuid.b);
+ snprintf(name, sizeof(name), "%pU", c->sb.user_uuid.b);
c->debug = debugfs_create_dir(name, bch_debug);
if (IS_ERR_OR_NULL(c->debug))
return;