diff options
author | Jens Axboe <axboe@fb.com> | 2014-05-30 16:25:36 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-30 16:25:36 +0200 |
commit | 67aec14ce87fe25bdfff7dbf468556333df11c4e (patch) | |
tree | 85857d82abc91996bfdf054774f46e5aa519acec /block/blk-mq.c | |
parent | blk-mq: blk_mq_tag_to_rq should handle flush request (diff) | |
download | linux-67aec14ce87fe25bdfff7dbf468556333df11c4e.tar.xz linux-67aec14ce87fe25bdfff7dbf468556333df11c4e.zip |
blk-mq: make the sysfs mq/ layout reflect current mappings
Currently blk-mq registers all the hardware queues in sysfs,
regardless of whether it uses them (e.g. they have CPU mappings)
or not. The unused hardware queues lack the cpux/ directories,
and the other sysfs entries (like active, pending, etc) are all
zeroes.
Change this so that sysfs correctly reflects the current mappings
of the hardware queues.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 21f952ab3581..71f564e8812e 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1924,6 +1924,8 @@ static void blk_mq_queue_reinit(struct request_queue *q) { blk_mq_freeze_queue(q); + blk_mq_sysfs_unregister(q); + blk_mq_update_queue_map(q->mq_map, q->nr_hw_queues); /* @@ -1934,6 +1936,8 @@ static void blk_mq_queue_reinit(struct request_queue *q) blk_mq_map_swqueue(q); + blk_mq_sysfs_register(q); + blk_mq_unfreeze_queue(q); } |