]> git.itanic.dy.fi Git - linux-stable/commit
virtio_blk: cleanup zoned device probing
authorChristoph Hellwig <hch@lst.de>
Sun, 17 Dec 2023 16:53:55 +0000 (17:53 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Dec 2023 03:17:43 +0000 (20:17 -0700)
commit77360cadaae562f437b3e98dc3af748d8d75bdc2
treef423d9ab807674fb3a1b8091c3bcf51c3cbc66a5
parent0bd7c5d802586e9d86c09f79cbf5ca8fdbec57ec
virtio_blk: cleanup zoned device probing

Move reading and checking the zoned model from virtblk_probe_zoned_device
into the caller, leaving only the code to perform the actual setup for
host managed zoned devices in virtblk_probe_zoned_device.

This allows to share the model reading and sharing between builds with
and without CONFIG_BLK_DEV_ZONED, and improve it for the
!CONFIG_BLK_DEV_ZONED case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20231217165359.604246-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/virtio_blk.c