Files
qemu/tests/qemu-iotests
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
..
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-05-12 17:42:23 +02:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2020-12-11 17:52:40 +01:00
2023-09-08 13:08:52 +03:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2023-09-08 13:08:52 +03:00
2022-03-29 16:30:55 +02:00
2020-09-08 13:40:49 +02:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2022-02-01 10:51:39 +01:00
2021-01-20 14:53:22 -06:00
2023-09-08 13:08:52 +03:00
2021-03-29 18:06:14 +02:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2022-10-27 20:13:32 +02:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2023-09-08 13:08:52 +03:00
2020-09-02 16:32:14 -05:00
2023-09-08 13:08:52 +03:00
2021-01-20 14:53:22 -06:00
2020-01-06 13:43:07 +01:00
2023-02-01 16:52:33 +01:00
2017-05-11 12:08:24 +02:00
2017-09-06 15:19:01 +01:00
2023-09-08 13:08:52 +03:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2020-12-11 17:52:40 +01:00
2020-01-06 13:43:07 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2018-06-11 16:18:45 +02:00
2021-07-09 13:18:32 +02:00
2021-01-20 14:53:22 -06:00
2021-03-29 14:13:55 +02:00
2021-01-26 14:36:37 +01:00
2021-01-26 14:36:37 +01:00
2021-03-18 09:22:55 +00:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2022-02-01 10:51:39 +01:00
2020-01-06 13:43:07 +01:00
2021-12-28 15:18:59 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-07-09 13:19:11 +02:00
2020-03-11 15:54:38 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2016-09-20 22:10:57 +02:00
2021-01-20 14:53:22 -06:00
2022-04-25 14:30:03 +02:00
2017-09-26 15:00:32 +02:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2017-02-12 00:47:42 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-26 14:36:37 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2020-09-07 12:31:31 +02:00
2021-11-23 15:39:12 +01:00
2022-03-22 10:50:10 +01:00
2022-03-22 10:50:10 +01:00
2021-01-20 14:53:22 -06:00
2022-02-01 10:51:39 +01:00
2021-11-23 15:39:12 +01:00
2022-03-22 10:14:34 +01:00
2022-03-22 10:14:34 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2023-09-08 13:08:52 +03:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2019-03-19 15:49:29 +01:00
2019-02-01 13:46:44 +01:00
2021-01-20 14:53:22 -06:00
2019-02-01 13:46:44 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2019-03-19 15:49:29 +01:00
2021-07-09 13:19:11 +02:00
2021-07-09 13:19:11 +02:00
2021-01-20 14:53:22 -06:00
2019-06-04 16:55:58 +02:00
2021-01-20 14:53:22 -06:00
2020-09-02 16:32:14 -05:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2022-01-14 12:03:16 +01:00
2021-01-20 14:53:22 -06:00
2019-11-18 16:01:31 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-12-28 15:18:59 +01:00
2021-12-28 15:18:59 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2021-11-01 11:54:59 -04:00
2023-09-08 13:08:52 +03:00
2021-01-20 14:53:22 -06:00
2021-07-09 13:18:32 +02:00
2022-02-01 10:51:39 +01:00
2022-02-01 10:51:39 +01:00
2021-01-20 14:53:22 -06:00
2021-01-20 14:53:22 -06:00
2023-03-10 15:14:46 +01:00
2023-03-10 15:14:46 +01:00
2023-06-02 11:24:18 -05:00
2021-01-27 20:53:14 +01:00
2023-10-04 11:03:54 -07:00
2023-09-08 13:08:52 +03:00

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@nongnu.org with a CC:
to qemu-block@nongnu.org.