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)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:44:43 +0000 (09:44 -0600)
commit6ecda70ea9c1bf37d2abdcf52dfe06d023276173
tree75d1987654f3ad9bbd3eaf91d8f947568cb2aa77
parentd476983ea078b7a101481967a3bb5ab6760cf759
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