aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2018-11-29 20:32:30 -0600
committerEric Blake <eblake@redhat.com>2018-11-30 13:55:18 -0600
commite31d802479df9daff1994a7ed1e36bbc5bb19d03 (patch)
tree446529f47db76c938ab2d440d0a0703826ca7636
parent4750e1a888ac3d320607f33b676f299005be98e6 (diff)
nbd/server: Advertise all contexts in response to bare LIST
The NBD spec, and even our code comment, says that if the client asks for NBD_OPT_LIST_META_CONTEXT with 0 queries, then we should reply with (a possibly-compressed representation of) ALL contexts that we are willing to let them try. But commit 3d068aff forgot to advertise qemu:dirty-bitmap:FOO. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20181130023232.3079982-2-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
-rw-r--r--nbd/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c
index dc04513de7..7af0ddffb2 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -978,6 +978,7 @@ static int nbd_negotiate_meta_queries(NBDClient *client,
if (client->opt == NBD_OPT_LIST_META_CONTEXT && !nb_queries) {
/* enable all known contexts */
meta->base_allocation = true;
+ meta->bitmap = !!meta->exp->export_bitmap;
} else {
for (i = 0; i < nb_queries; ++i) {
ret = nbd_negotiate_meta_query(client, meta, errp);