nbd/server: Prepare for per-request filtering of BLOCK_STATUS
authorEric Blake <eblake@redhat.com>
Mon, 25 Sep 2023 19:22:41 +0000 (14:22 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 5 Oct 2023 16:02:08 +0000 (11:02 -0500)
commit1dec4643d13cb3ba8315e07ce89c7fd4faaff2de
treeba4d1c3fb06f072e3fd4a7d217140d54b3e492e0
parentfd358d83901d7ccf51a389bd2d0718b28ca77c1f
nbd/server: Prepare for per-request filtering of BLOCK_STATUS

The next commit will add support for the optional extension
NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can
request that the server only return a subset of negotiated contexts,
rather than all contexts.  To make that task easier, this patch
populates the list of contexts to return on a per-command basis (for
now, identical to the full set of negotiated contexts).

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20230925192229.3186470-25-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
include/block/nbd.h
nbd/server.c