summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2024-07-08 12:16:50 +0300
committerJens Axboe <axboe@kernel.dk>2024-07-09 09:00:17 +0300
commitaf2817229158cea7960b9132e0a8c4470ebbfef5 (patch)
tree347314ce74f4468f80a8edbe9200c89fe7fd5a84 /drivers/block
parentaddc3a68de850fa25dcf937705e721d8eec22470 (diff)
downloadlinux-af2817229158cea7960b9132e0a8c4470ebbfef5.tar.xz
virtio_blk: Don't bother validating blocksize
The block queue limits validation does this for us now. Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20240708091651.177447-5-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index f11b0c3b2625..e3147a611151 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -1289,18 +1289,9 @@ static int virtblk_read_limits(struct virtio_blk *vblk,
lim->max_segment_size = max_size;
/* Host can optionally specify the block size of the device */
- err = virtio_cread_feature(vdev, VIRTIO_BLK_F_BLK_SIZE,
+ virtio_cread_feature(vdev, VIRTIO_BLK_F_BLK_SIZE,
struct virtio_blk_config, blk_size,
&lim->logical_block_size);
- if (!err) {
- err = blk_validate_block_size(lim->logical_block_size);
- if (err) {
- dev_err(&vdev->dev,
- "virtio_blk: invalid block size: 0x%x\n",
- lim->logical_block_size);
- return err;
- }
- }
/* Use topology information if available */
err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,