]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: remap queues when adding/removing hardware queues
authorOmar Sandoval <osandov@fb.com>
Fri, 7 Apr 2017 14:53:11 +0000 (08:53 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 7 Apr 2017 14:56:49 +0000 (08:56 -0600)
commit365a2e48842f8af907158c42dbff1e03d5e58cf9
treebf15660fb38869b2e4edc574a20b4415c9cd5cf6
parent04f09f3b1cb2ce9a4d8f48ed066f50b01d2f0bda
blk-mq: remap queues when adding/removing hardware queues

blk_mq_update_nr_hw_queues() used to remap hardware queues, which is the
behavior that drivers expect. However, commit 44578e0dbc13 changed
blk_mq_queue_reinit() to not remap queues for the case of CPU
hotplugging, inadvertently making blk_mq_update_nr_hw_queues() not remap
queues as well. This breaks, for example, NBD's multi-connection mode,
leaving the added hardware queues unused. Fix it by making
blk_mq_update_nr_hw_queues() explicitly remap the queues.

Fixes: 44578e0dbc13 ("blk-mq: don't redistribute hardware queues on a CPU hotplug event")
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c