virtio: blk: support block sizes exceeding 512 bytes
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 30 Aug 2025 20:39:54 +0000 (22:39 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 10 Sep 2025 17:02:23 +0000 (11:02 -0600)
commitc85b8071e7d3fd333f8a2fdd28083cb5ec3a0645
tree7d3215768a0fc013e8f997ae99310de322baa011
parent5964c6f4ef0934130f41c347c771dfb97210490c
virtio: blk: support block sizes exceeding 512 bytes

QEMU allows to specify the logical block size via parameter
logical_block_size of a virtio-blk-device.

The communication channel via virtqueues remains based on 512 byte blocks
even if the logical_block_size is larger.

Consider the logical block size in the block device driver.

Reported-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
drivers/virtio/virtio_blk.c