]> nv-tegra.nvidia Code Review - linux-4.9.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)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 20 Oct 2018 06:34:33 +0000 (23:34 -0700)
commit213c39c7d3898f0e3608872a474daafaab99a266
treeb49ae06e209fcb279091734780fcd6f4deb5da33
parent58ec8cb0c101b39227f52424865d504bac55c37f
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 4e68a011428a 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.

bug 200456501

Change-Id: Idd00bac7106378748b6c9e1ab0af31e6fb136535
Fixes: 4e68a011428a ("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>
Reviewed-on: https://git-master.nvidia.com/r/1926247
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
block/blk-mq.c