diff options
author | Omar Sandoval <osandov@fb.com> | 2017-10-03 17:57:16 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-03 17:58:55 -0400 |
commit | 70e62f4bacdf31ea8a59f241c9229120cd06d9d1 (patch) | |
tree | 5a819f2cab1d2bdb4706fdf31f32c011ee8ed7f2 | |
parent | 6cd1a6fef7058de15405b13d6587538853279c7b (diff) |
blk-mq-debugfs: fix device sched directory for default scheduler
In blk_mq_debugfs_register(), I remembered to set up the per-hctx sched
directories if a default scheduler was already configured by
blk_mq_sched_init() from blk_mq_init_allocated_queue(), but I didn't do
the same for the device-wide sched directory. Fix it.
Fixes: d332ce091813 ("blk-mq-debugfs: allow schedulers to register debugfs attributes")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/blk-mq-debugfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 980e73095643..de294d775acf 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c | |||
@@ -815,10 +815,14 @@ int blk_mq_debugfs_register(struct request_queue *q) | |||
815 | goto err; | 815 | goto err; |
816 | 816 | ||
817 | /* | 817 | /* |
818 | * blk_mq_init_hctx() attempted to do this already, but q->debugfs_dir | 818 | * blk_mq_init_sched() attempted to do this already, but q->debugfs_dir |
819 | * didn't exist yet (because we don't know what to name the directory | 819 | * didn't exist yet (because we don't know what to name the directory |
820 | * until the queue is registered to a gendisk). | 820 | * until the queue is registered to a gendisk). |
821 | */ | 821 | */ |
822 | if (q->elevator && !q->sched_debugfs_dir) | ||
823 | blk_mq_debugfs_register_sched(q); | ||
824 | |||
825 | /* Similarly, blk_mq_init_hctx() couldn't do this previously. */ | ||
822 | queue_for_each_hw_ctx(q, hctx, i) { | 826 | queue_for_each_hw_ctx(q, hctx, i) { |
823 | if (!hctx->debugfs_dir && blk_mq_debugfs_register_hctx(q, hctx)) | 827 | if (!hctx->debugfs_dir && blk_mq_debugfs_register_hctx(q, hctx)) |
824 | goto err; | 828 | goto err; |