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)
committerSagi Grimberg <sagi@grimberg.me>
Tue, 21 Mar 2017 16:38:46 +0000 (18:38 +0200)
commit945dd5bacc8978439af276976b5dcbbd42333dbc
tree51abbd169efcc4deed4e4b17a613b3e887d40727
parentc248c64387fac5a6b31b343d9acb78f478e8619c
nvme-loop: handle cpu unplug when re-establishing the controller

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>
drivers/nvme/target/loop.c