virtio_blk: pass queue_limits to blk_mq_alloc_disk
authorChristoph Hellwig <hch@lst.de>
Tue, 13 Feb 2024 07:34:22 +0000 (08:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Feb 2024 15:56:59 +0000 (08:56 -0700)
commit8b837256560c783415b42748959900befcde2d00
treee21a562260bf9a3083272f4650505a47501093be
parent718628adfcfdc80466eb42cd9c615d1d5514f74c
virtio_blk: pass queue_limits to blk_mq_alloc_disk

Call virtblk_read_limits and most of virtblk_probe_zoned_device before
allocating the gendisk and thus request_queue and make them read into
a queue_limits structure instead.  Pass this initialized queue_limits
to blk_mq_alloc_disk to set the queue up with the right parameters
from the start and only leave a few final touches for zoned devices
to be done just before adding the disk.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20240213073425.1621680-13-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/virtio_blk.c