ublk: reorder tag_set initialization before queue allocation
authorMing Lei <ming.lei@redhat.com>
Sat, 1 Nov 2025 13:31:16 +0000 (21:31 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Nov 2025 15:34:59 +0000 (08:34 -0700)
commit011af85ccd871526df36988c7ff20ca375fb804d
tree409fe9ea5d3e4d229dc91470466160df1caf3bc2
parentbc49af56eea866c34d21bf582f65b02fc8c06ec3
ublk: reorder tag_set initialization before queue allocation

Move ublk_add_tag_set() before ublk_init_queues() in the device
initialization path. This allows us to use the blk-mq CPU-to-queue
mapping established by the tag_set to determine the appropriate
NUMA node for each queue allocation.

The error handling paths are also reordered accordingly.

Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c