From 1ca9e169f34ef1c548b45a05f460f69e97ae0201 Mon Sep 17 00:00:00 2001 From: John Snow Date: Fri, 22 Mar 2019 03:22:38 +0100 Subject: [PATCH 071/163] nbd/server: Advertise all contexts in response to bare LIST RH-Author: John Snow Message-id: <20190322032241.8111-26-jsnow@redhat.com> Patchwork-id: 85109 O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 25/28] nbd/server: Advertise all contexts in response to bare LIST Bugzilla: 1691563 RH-Acked-by: Max Reitz RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Miroslav Rezanina From: Eric Blake 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 Message-Id: <20181130023232.3079982-2-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy (cherry picked from commit e31d802479df9daff1994a7ed1e36bbc5bb19d03) Signed-off-by: John Snow Signed-off-by: Miroslav Rezanina --- nbd/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nbd/server.c b/nbd/server.c index e8fd6b4..abf03e8 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); -- 1.8.3.1