qemu-e2k/tests
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
..
avocado tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed) 2023-10-04 11:03:54 -07:00
bench
data tests/acpi: update virt/SSDT.memhp 2023-09-18 15:27:27 +02:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker tests/docker: Update docker-loongarch-cross toolchain 2023-09-20 15:06:33 +01:00
fp
guest-debug tests/tcg: clean-up gdb confirm/pagination settings 2023-08-30 14:57:50 +01:00
image-fuzzer
include
keys
lcitool tests: update most Debian images to Bookworm 2023-09-20 15:06:26 +01:00
migration s390x/a-b-bios: zero the first byte of each page on start 2023-10-04 11:48:18 +02:00
multiboot
perf/block/qcow2
plugin Makefile: build plugins before running TCG tests 2023-10-02 18:04:39 +02:00
qapi-schema tests/: spelling fixes 2023-09-08 13:08:52 +03:00
qemu-iotests nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS 2023-10-05 11:02:08 -05:00
qtest virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
rocker
tcg tests/tcg: Reset result register after each test 2023-09-29 08:28:09 +02:00
tsan tests/: spelling fixes 2023-09-08 13:08:52 +03:00
uefi-test-tools tests/: spelling fixes 2023-09-08 13:08:52 +03:00
unit virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
vm tests/: spelling fixes 2023-09-08 13:08:52 +03:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include Makefile: build plugins before running TCG tests 2023-10-02 18:04:39 +02:00
meson.build Makefile: build plugins before running TCG tests 2023-10-02 18:04:39 +02:00
test-qht-par.c
vhost-user-bridge.c