qemu/docs/interop
Eric Blake 2dcbb11b39 nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS
Allow a client to request a subset of negotiated meta contexts.  For
example, a client may ask to use a single connection to learn about
both block status and dirty bitmaps, but where the dirty bitmap
queries only need to be performed on a subset of the disk; forcing the
server to compute that information on block status queries in the rest
of the disk is wasted effort (both at the server, and on the amount of
traffic sent over the wire to be parsed and ignored by the client).

Qemu as an NBD client never requests to use more than one meta
context, so it has no need to use block status payloads.  Testing this
instead requires support from libnbd, which CAN access multiple meta
contexts in parallel from a single NBD connection; an interop test
submitted to the libnbd project at the same time as this patch
demonstrates the feature working, as well as testing some corner cases
(for example, when the payload length is longer than the export
length), although other corner cases (like passing the same id
duplicated) requires a protocol fuzzer because libnbd is not wired up
to break the protocol that badly.

This also includes tweaks to 'qemu-nbd --list' to show when a server
is advertising the capability, and to the testsuite to reflect the
addition to that output.

Of note: qemu will always advertise the new feature bit during
NBD_OPT_INFO if extended headers have alreay been negotiated
(regardless of whether any NBD_OPT_SET_META_CONTEXT negotiation has
occurred); but for NBD_OPT_GO, qemu only advertises the feature if
block status is also enabled (that is, if the client does not
negotiate any contexts, then NBD_CMD_BLOCK_STATUS cannot be used, so
the feature is not advertised).

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20230925192229.3186470-26-eblake@redhat.com>
[eblake: fix logic to reject unnegotiated contexts]
Signed-off-by: Eric Blake <eblake@redhat.com>
2023-10-05 11:02:08 -05:00
..
barrier.rst docs: Move the protocol part of barrier.txt into interop 2021-08-02 12:55:51 +01:00
bitmaps.rst docs/interop/bitmaps: use blockdev-backup 2021-11-09 18:20:47 +01:00
dbus-display.rst docs: add dbus-display documentation 2021-12-21 10:50:21 +04:00
dbus-vmstate.rst docs: move D-Bus VMState documentation to source XML 2021-12-21 10:50:21 +04:00
dbus.rst docs: add dbus-display documentation 2021-12-21 10:50:21 +04:00
firmware.json qapi: @foo should be used to reference, not `foo` 2023-04-28 11:48:34 +02:00
index.rst docs/interop: Convert qmp-spec.txt to rST 2023-05-22 10:21:01 +02:00
live-block-operations.rst docs: add an introduction to the system docs 2023-02-02 11:48:18 +00:00
nbd.txt nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS 2023-10-05 11:02:08 -05:00
parallels.txt parallels.txt: fix bitmap L1 table description 2021-03-08 14:56:54 +01:00
pr-helper.rst global: Squash 'the the' 2019-11-06 17:19:40 +01:00
prl-xml.txt docs/interop/prl-xml: description of Parallels Disk format 2018-01-22 14:02:33 +00:00
qcow2.txt qcow2: Explicit mention of padding bytes 2023-06-02 11:24:18 -05:00
qed_spec.txt docs: create interop/ subdirectory 2017-06-15 11:18:39 +02:00
qemu-ga-ref.rst docs: Remove stale TODO comments about license and version 2021-08-02 11:42:38 +01:00
qemu-ga.rst qga: Add new option --allow-rpcs 2023-07-10 15:54:40 +03:00
qemu-qmp-ref.rst docs: add an introduction to the system docs 2023-02-02 11:48:18 +00:00
qemu-storage-daemon-qmp-ref.rst docs: Remove stale TODO comments about license and version 2021-08-02 11:42:38 +01:00
qmp-spec.rst docs/interop/qmp-spec: Update error description for parsing errors 2023-05-22 10:22:29 +02:00
vhost-user-gpu.rst docs: vhost-user-gpu: add protocol changes for dmabuf modifiers 2023-09-12 10:37:01 +04:00
vhost-user.json configure: Improve OpenGL dependency detections 2021-03-04 09:35:30 +01:00
vhost-user.rst vhost-user: add shared_object msg 2023-10-04 18:15:06 -04:00
vhost-vdpa.rst vhost-vdpa: introduce vhost-vdpa backend 2020-07-07 07:59:51 -04:00
virtio-balloon-stats.rst docs: reSTify virtio-balloon-stats documentation and move to docs/interop 2022-01-07 19:30:13 -05:00
vnc-ledstate-pseudo-encoding.rst docs/interop: Change the vnc-ledstate-Pseudo-encoding doc into .rst 2023-01-09 13:50:47 +01:00