diff options
author | John Garry <john.g.garry@oracle.com> | 2024-07-08 12:16:47 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-07-09 09:00:17 +0300 |
commit | 4ff3d01275dee10ed1f40c314ba5133e3c7a6e1b (patch) | |
tree | 763eee89e57308d6c7248720846d35c68941d315 /scripts/generate_rust_analyzer.py | |
parent | 6b43537faef35eb3d2657e2a1ec668a31b5ba5d1 (diff) | |
download | linux-4ff3d01275dee10ed1f40c314ba5133e3c7a6e1b.tar.xz |
virtio_blk: Fix default logical block size fallback
If we fail to read a logical block size in virtblk_read_limits() ->
virtio_cread_feature(), then we default to what is in
lim->logical_block_size, but that would be 0.
We can deal with lim->logical_block_size = 0 later in the
blk_mq_alloc_disk(), but the code in virtblk_read_limits() needs a proper
default, so give a default of SECTOR_SIZE.
Fixes: 27e32cd23fed ("block: pass a queue_limits argument to blk_mq_alloc_disk")
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>
Link: https://lore.kernel.org/r/20240708091651.177447-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions