diff options
author | Mike Snitzer <snitzer@redhat.com> | 2015-03-12 23:56:02 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-03-13 10:26:53 -0400 |
commit | b62c21b71f08b7a4bfd025616ff1da2913a82904 (patch) | |
tree | 7279ceaf99ed83c103f95b3a8cbab3ab0ed51e1c /block/blk-mq-sysfs.c | |
parent | 64f9b683b6418d946101a9068d133b6daa3a22aa (diff) |
blk-mq: add blk_mq_init_allocated_queue and export blk_mq_register_disk
Add a variant of blk_mq_init_queue that allows a previously allocated
queue to be initialized. blk_mq_init_allocated_queue models
blk_init_allocated_queue -- which was also created for DM's use.
DM's approach to device creation requires a placeholder request_queue be
allocated for use with alloc_dev() but the decision about what type of
request_queue will be ultimately created is deferred until all component
devices referenced in the DM table are processed to determine the table
type (request-based, blk-mq request-based, or bio-based).
Also, because of DM's late finalization of the request_queue type
the call to blk_mq_register_disk() doesn't happen during alloc_dev().
Must export blk_mq_register_disk() so that DM can backfill the 'mq' dir
once the blk-mq queue is fully allocated.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sysfs.c')
-rw-r--r-- | block/blk-mq-sysfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index 1630a20d5dcf..b79685e06b70 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c | |||
@@ -436,6 +436,7 @@ int blk_mq_register_disk(struct gendisk *disk) | |||
436 | 436 | ||
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
439 | EXPORT_SYMBOL_GPL(blk_mq_register_disk); | ||
439 | 440 | ||
440 | void blk_mq_sysfs_unregister(struct request_queue *q) | 441 | void blk_mq_sysfs_unregister(struct request_queue *q) |
441 | { | 442 | { |