]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
blk-mq: make sure that correct hctx->next_cpu is set
authorMing Lei <ming.lei@redhat.com>
Tue, 15 May 2018 13:03:14 +0000 (10:03 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 12 Jun 2018 06:28:55 +0000 (02:28 -0400)
commit6d68f59ed86e4e40f9cf63ce261629f68e4e8da6
tree6b91b20eab2ae2cb5db44a4c7929ee212cd56746
parent81517da9f62664d1a31ff4bde0185f548954995b
blk-mq: make sure that correct hctx->next_cpu is set

BugLink: http://bugs.launchpad.net/bugs/1759723
From commit 20e4d81393196 (blk-mq: simplify queue mapping & schedule
with each possisble CPU), one hctx can be mapped from all offline CPUs,
then hctx->next_cpu can be set as wrong.

This patch fixes this issue by making hctx->next_cpu pointing to the
first CPU in hctx->cpumask if all CPUs in hctx->cpumask are offline.

Cc: Stefan Haberland <sth@linux.vnet.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Fixes: 20e4d81393196 ("blk-mq: simplify queue mapping & schedule with each possisble CPU")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit a1c735fb790745f94a359df45c11df4a69760389)
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.ibm.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
block/blk-mq.c