Re: [PATCH 1/1] virtio-blk: Add description for blk_size field

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

 




On 03/10/2024 2:56, Daniel Verkamp wrote:
On Mon, Sep 30, 2024 at 6:45 PM Daniel Verkamp <dverkamp@xxxxxxxxxxxx> wrote:
On Wed, Sep 25, 2024 at 4:42 PM Max Gurtovoy <mgurtovoy@xxxxxxxxxx> wrote:
[...]
I'm curious if you've encountered any actual implementations where
drivers send non-block-size-aligned requests to block devices. I never
saw such implementation.
I don't know of any real-world implementations like this, but the
point of the spec is to allow interoperability without having to know
about every implementation.
I did find at least one existing real-world driver implementation that
ignores blk_size and VIRTIO_BLK_F_BLK_SIZE - the u-boot virtio-blk
driver: https://github.com/u-boot/u-boot/blob/master/drivers/virtio/virtio_blk.c

So this is not just spec language lawyering; this driver depends on
the ability to read/write at arbitrary 512-byte sector addresses and
data sizes, and it seems like it should be allowed to do that based on
my reading of the spec.

(Perhaps u-boot's driver does not work with the QEMU's virtio-blk
device with certain storage configurations, per Stefan's note, but
that is again just one device implementation.)

Vague specifications and inconsistent interpretations should be avoided.

I'm trying to make the situation better.

I'll send a V2 according to the comments.

BTW, Are you familiar with some virtio-blk device that implements the buffer-cache logic you've described ? or is it only a theoretical discussion ?



-- Daniel




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux