nvme-loop: handle cpu unplug when re-establishing the controller
authorSagi Grimberg <sagi@grimberg.me>
Mon, 13 Mar 2017 11:27:51 +0000 (13:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:23:37 +0000 (14:23 +0100)
commit8f21b63c9dcf5a9242cecaa6289b8ce19026cb66
tree3e1688be6411dde29ab85cbcf340c264f9eb4fae
parentc9bbd2727d1e02584ee98efe075e3483c287adb0
nvme-loop: handle cpu unplug when re-establishing the controller

[ Upstream commit 945dd5bacc8978439af276976b5dcbbd42333dbc ]

If a cpu unplug event has occured, we need to take the minimum
of the provided nr_io_queues and the number of online cpus,
otherwise we won't be able to connect them as blk-mq mapping
won't dispatch to those queues.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/target/loop.c