blk-mq: register device instead of disk

Enable devices without a gendisk instance to register itself with blk-mq
and expose the associated multi-queue sysfs entries.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Matias Bjørling
2016-09-16 14:25:06 +02:00
committed by Jens Axboe
parent 9ae2d0aa50
commit b21d5b3017
4 changed files with 12 additions and 15 deletions

View File

@@ -955,7 +955,7 @@ int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t)
dm_init_md_queue(md);
/* backfill 'mq' sysfs registration normally done in blk_register_queue */
blk_mq_register_disk(md->disk);
blk_mq_register_dev(disk_to_dev(md->disk), q);
return 0;