]> git.baikalelectronics.ru Git - kernel.git/commit
ublk: rewrite ublk_ctrl_get_queue_affinity to not rely on hctx->cpumask
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Jul 2022 13:09:15 +0000 (15:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jul 2022 16:52:12 +0000 (10:52 -0600)
commit7eb88cd550d04c789c43956d01d31b24ad999d17
tree976daac12b9be21dc97e368f9a284c559e1028bf
parent6aa88c79f2b2e8fca95e9d3e744ee960a0431687
ublk: rewrite ublk_ctrl_get_queue_affinity to not rely on hctx->cpumask

Looking at the hctxs and cpumap is not safe without at very last a RCU
reference.  It also requires the queue to be set up before starting the
device, which leads to rather awkward life time rules.

Instead rewrite ublk_ctrl_get_queue_affinity to just build the cpumask
directly from the mq_map in the tag set, similar to hctx->cpumask is
built.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220721130916.1869719-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c