]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: split out a __blk_mq_get_driver_tag helper
authorChristoph Hellwig <hch@lst.de>
Fri, 5 Jun 2020 11:44:09 +0000 (19:44 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 7 Jun 2020 14:56:50 +0000 (08:56 -0600)
commit0eccae0169bb5f46af96d1f03f7112f8a6458d57
tree854865cc1204b8f951610b46cfe788741114cc75
parent6c276c8e78ddd9e1e8a361d6669f7c7826d14085
blk-mq: split out a __blk_mq_get_driver_tag helper

Allocation of the driver tag in the case of using a scheduler shares very
little code with the "normal" tag allocation.  Split out a new helper to
streamline this path, and untangle it from the complex normal tag
allocation.

This way also avoids to fail driver tag allocation because of inactive hctx
during cpu hotplug, and fixes potential hang risk.

Fixes: 367a3e0056f7 ("blk-mq: drain I/O when all CPUs in a hctx are offline")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: John Garry <john.garry@huawei.com>
Cc: Dongli Zhang <dongli.zhang@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c
block/blk-mq-tag.h
block/blk-mq.c
block/blk-mq.h