Re: [PATCH 1/5] virtio_blk: Fix default logical block size fallback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 05, 2024 at 11:51:23AM +0000, John Garry wrote:
> 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")
> Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>
> ---
>  drivers/block/virtio_blk.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux