OSDN Git Service

nbd: Add types for extended headers
authorEric Blake <eblake@redhat.com>
Tue, 29 Aug 2023 17:58:30 +0000 (12:58 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 22 Sep 2023 22:21:08 +0000 (17:21 -0500)
commitd95ffb6fe6008c114602e20d848100081d62f7aa
tree6e051c4a1e55a3ba7dec997426a9a4ab450b4df2
parent297365b40ff24c7e07d6f40ec8f9ac83229ace94
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>
Message-ID: <20230829175826.377251-22-eblake@redhat.com>
block/nbd.c
include/block/nbd.h
nbd/common.c
nbd/nbd-internal.h
nbd/server.c