diff options
author | Eric Blake <eblake@redhat.com> | 2023-09-25 14:22:40 -0500 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2023-10-05 11:02:08 -0500 |
commit | fd358d83901d7ccf51a389bd2d0718b28ca77c1f (patch) | |
tree | 10bf63898a86d6d63736ecf96885684f6ed99cba /include | |
parent | 56cf9d0471c6481adcada2b6afbaf6c7af9e76c7 (diff) | |
download | qemu-fd358d83901d7ccf51a389bd2d0718b28ca77c1f.zip qemu-fd358d83901d7ccf51a389bd2d0718b28ca77c1f.tar.gz qemu-fd358d83901d7ccf51a389bd2d0718b28ca77c1f.tar.bz2 |
nbd/server: Refactor list of negotiated meta contexts
Peform several minor refactorings of how the list of negotiated meta
contexts is managed, to make upcoming patches easier: Promote the
internal type NBDExportMetaContexts to the public opaque type
NBDMetaContexts, and mark exp const. Use a shorter member name in
NBDClient. Hoist calls to nbd_check_meta_context() earlier in their
callers, as the number of negotiated contexts may impact the flags
exposed in regards to an export, which in turn requires a new
parameter. Drop a redundant parameter to nbd_negotiate_meta_queries.
No semantic change intended on the success path; on the failure path,
dropping context in nbd_check_meta_export even when reporting an error
is safer.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-ID: <20230925192229.3186470-24-eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/nbd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/nbd.h b/include/block/nbd.h index ba8724f..2006497 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -29,6 +29,7 @@ typedef struct NBDExport NBDExport; typedef struct NBDClient NBDClient; typedef struct NBDClientConnection NBDClientConnection; +typedef struct NBDMetaContexts NBDMetaContexts; extern const BlockExportDriver blk_exp_nbd; |