[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] structured reply behavior for read of 0 bytes
From: |
Eric Blake |
Subject: |
[Qemu-devel] structured reply behavior for read of 0 bytes |
Date: |
Fri, 3 Nov 2017 17:45:07 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
As currently written, structured reply is documented as:
> NBD_REPLY_TYPE_OFFSET_DATA (1)
>
> This chunk type is in the content chunk category. length MUST be at least 9.
> It represents the contents of length - 8 bytes of the file, starting at the
> absolute offset from the start of the export.
which implies that the data size must be non-zero. But clients can
request a read of size 0 (the spec doesn't forbid it, but neither does
it define special semantics for it), and the existing qemu
implementation as of qemu commit f140e300 sends
NBD_REPLY_TYPE_OFFSET_DATA with length of 8 and no data payload if the
client requests a 0-byte read. Should we specifically allow this
particular answer, or should a 0-length read be answered solely by
NBD_REPLY_TYPE_NONE, meaning that qemu's current behavior needs a tweak?
Either way, I probably need another tweak to the NBD spec for
structured reads.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] structured reply behavior for read of 0 bytes,
Eric Blake <=