Re: [PATCH] blk-mq: remap queues when adding/removing hardware queues
From: Omar Sandoval <osandov@osandov.com>
Date: 2017-03-31 19:02:03
From: Omar Sandoval <osandov@osandov.com>
Date: 2017-03-31 19:02:03
On Fri, Mar 31, 2017 at 11:59:24AM -0700, Omar Sandoval wrote:
From: Omar Sandoval <redacted>
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_queue_reinit() optionally remap queues, which we do when updating
the number of hardware queues but not when hotplugging.
Fixes: 4e68a011428a ("blk-mq: don't redistribute hardware queues on a CPU hotplug event")
Signed-off-by: Omar Sandoval <redacted>
---
The only callers of blk_mq_update_nr_hw_queues() are nbd and nbd. I *think*
nbd_dev_add() also wants this remap behavior.Uh, I meant nbd and nvme, and nvme_dev_add().