]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: clear hctx->dispatch_from when mappings change
authorhuhai <huhai@kylinos.cn>
Fri, 18 May 2018 14:32:30 +0000 (08:32 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 May 2018 14:35:38 +0000 (08:35 -0600)
commitb36755ab05f95250601d7636a3cf31367490aaca
treedbc881f131ae6981d736023cf1ba9fc59e292ed5
parent2069ab413ba15002f2c980288ac37b9bd98cfe99
blk-mq: clear hctx->dispatch_from when mappings change

When the number of hardware queues is changed, the drivers will call
blk_mq_update_nr_hw_queues() to remap hardware queues. This changes
the ctx mappings, but the current code doesn't clear the
->dispatch_from hint. This can result in dispatch_from pointing to
a ctx that isn't mapped to the hctx anymore.

Fixes: 3533ef83e308 ("blk-mq-sched: improve dispatching from sw queue")
Signed-off-by: huhai <huhai@kylinos.cn>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Moved the placement of the clearing to where we clear other items
pertaining to the existing mapping, added Fixes line, and reworded
the commit message.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c