nbd: Add types for extended headers
commitbecea059be19d095c303b650a2dcaf6950fc57a5
authorEric Blake <eblake@redhat.com>
Tue, 6 Jun 2023 15:22:51 +0000 (6 10:22 -0500)
committerEric Blake <eblake@redhat.com>
Tue, 29 Aug 2023 17:38:21 +0000 (29 12:38 -0500)
tree388fb450a90fdfaf96ac8bf57b89f018900f8ef5
parent692e3e915e08f4317df9e1ad2ea396862e7f2a7e
nbd: Add types for extended headers

Add the constants and structs necessary for later patches to start
implementing the NBD_OPT_EXTENDED_HEADERS extension in both the client
and server, matching recent upstream nbd.git (through commit
e6f3b94a934).  This patch does not change any existing behavior, but
merely sets the stage for upcoming patches.

This patch does not change the status quo that neither the client nor
server use a packed-struct representation for the request header.
While most of the patch adds new types, there is also some churn for
renaming the existing NBDExtent to NBDExtent32 to contrast it with
NBDExtent64, which I thought was a nicer name than NBDExtentExt.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---

v5: Add R-b

v4: Hoist earlier in series, tweak a few comments, defer docs/interop
change to when feature is actually turned on, NBDExtent rename, add
QEMU_BUG_BUILD_ON for sanity sake, hoist in block status payload bits
from v3 14/14; R-b dropped
block/nbd.c
include/block/nbd.h
nbd/common.c
nbd/nbd-internal.h
nbd/server.c