summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-04-26 13:47:48 -0700
committerJens Axboe <axboe@fb.com>2017-04-26 15:09:04 -0600
commit2d0364c8c1a97a1d44760895a982221c06af0f35 (patch)
tree815eee282e7f3204d4c723e5b190ffc026f0fb02 /block/blk-mq.h
parent1608fd1ca3b9357ea20ffc3a8ad2d1e4b78301a6 (diff)
downloadlinux-0-day-2d0364c8c1a97a1d44760895a982221c06af0f35.tar.gz
linux-0-day-2d0364c8c1a97a1d44760895a982221c06af0f35.tar.xz
blk-mq: Register <dev>/queue/mq after having registered <dev>/queue
A later patch in this series will modify blk_mq_debugfs_register() such that it uses q->kobj.parent to determine the name of a request queue. Hence make sure that that pointer is initialized before blk_mq_debugfs_register() is called. To avoid lock inversion, protect sysfs / debugfs registration with the queue sysfs_lock instead of the global mutex all_q_mutex. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 524f44742816c..7d955c756810a 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -78,6 +78,7 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
*/
extern void blk_mq_sysfs_init(struct request_queue *q);
extern void blk_mq_sysfs_deinit(struct request_queue *q);
+extern int __blk_mq_register_dev(struct device *dev, struct request_queue *q);
extern int blk_mq_sysfs_register(struct request_queue *q);
extern void blk_mq_sysfs_unregister(struct request_queue *q);
extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);