diff options
-rw-r--r-- | drivers/md/bcache/bset.c | 2 | ||||
-rw-r--r-- | drivers/md/bcache/btree.c | 2 | ||||
-rw-r--r-- | drivers/md/bcache/closure.c | 4 | ||||
-rw-r--r-- | drivers/md/bcache/closure.h | 2 | ||||
-rw-r--r-- | drivers/md/bcache/super.c | 1 |
5 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index bb0f7ae14b3..79fe1f0190f 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c @@ -161,7 +161,7 @@ bool bch_ptr_bad(struct btree *b, const struct bkey *k) #ifdef CONFIG_BCACHE_EDEBUG bug: mutex_unlock(&b->c->bucket_lock); - btree_bug(b, "inconsistent pointer %s: bucket %li pin %i " + btree_bug(b, "inconsistent pointer %s: bucket %zu pin %i " "prio %i gen %i last_gc %i mark %llu gc_gen %i", pkey(k), PTR_BUCKET_NR(b->c, k, i), atomic_read(&g->pin), g->prio, g->gen, g->last_gc, GC_MARK(g), g->gc_gen); diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index e7bc917ef0d..af9ea4a9633 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -240,7 +240,7 @@ out: closure_return(cl); err: set_btree_node_io_error(b); - bch_cache_set_error(b->c, "%s at bucket %lu, block %zu, %u keys", + bch_cache_set_error(b->c, "%s at bucket %zu, block %zu, %u keys", err, PTR_BUCKET_NR(b->c, &b->key, 0), index(i, b), i->keys); goto out; diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c index d6fbec0f848..f54f7c9981d 100644 --- a/drivers/md/bcache/closure.c +++ b/drivers/md/bcache/closure.c @@ -334,14 +334,12 @@ static const struct file_operations debug_ops = { .release = single_release }; -int __init closure_debug_init(void) +void __init closure_debug_init(void) { debug = debugfs_create_file("closures", 0400, NULL, NULL, &debug_ops); return 0; } -module_init(closure_debug_init); - #endif MODULE_AUTHOR("Kent Overstreet <koverstreet@google.com>"); diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h index 3f31d599ea5..00039924ea9 100644 --- a/drivers/md/bcache/closure.h +++ b/drivers/md/bcache/closure.h @@ -313,11 +313,13 @@ void __closure_flush_sync(struct closure *cl, struct timer_list *timer); #ifdef CONFIG_BCACHE_CLOSURES_DEBUG +void closure_debug_init(void); void closure_debug_create(struct closure *cl); void closure_debug_destroy(struct closure *cl); #else +static inline void closure_debug_init(void) {} static inline void closure_debug_create(struct closure *cl) {} static inline void closure_debug_destroy(struct closure *cl) {} diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 31ef47f1f3b..7b8efc77087 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1917,6 +1917,7 @@ static int __init bcache_init(void) mutex_init(&bch_register_lock); init_waitqueue_head(&unregister_wait); register_reboot_notifier(&reboot); + closure_debug_init(); bcache_major = register_blkdev(0, "bcache"); if (bcache_major < 0) |