Re: [PATCH 12/15] virtio_blk: pass queue_limits to blk_mq_alloc_disk

Christoph Hellwig
2024-07-01T04:54:57Z

On Sun, Jun 30, 2024 at 10:55:12AM +0100, John Garry wrote:
> According to the comment on virtio_cread_feature, it is conditional (which
> I read as optional) and that function can only fail with -ENOENT. So I
> don't think that the probe should fail. virtio people?

Oh well..

> I think that it would need to be:
> blk_size = lim->logical_block_size = SECTOR_SIZE;
>
> Which is a big ugly, so maybe:
>
> if (err)
> blk_size = SECTOR_SIZE;
> lim->logical_block_size = SECTOR_SIZE;
>
> or, alternatively, set bsize to SECTOR_SIZE when declared.

Maybe just set up logical_block_size at lim declaration time as in
your patch that started this, and then kill the blk_size variable
entirely and just use lim->logical_block_size.