Blame SOURCES/kvm-nbd-server-Advertise-all-contexts-in-response-to-bar.patch

7711c0
From 1ca9e169f34ef1c548b45a05f460f69e97ae0201 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Fri, 22 Mar 2019 03:22:38 +0100
7711c0
Subject: [PATCH 071/163] nbd/server: Advertise all contexts in response to
7711c0
 bare LIST
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190322032241.8111-26-jsnow@redhat.com>
7711c0
Patchwork-id: 85109
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 25/28] nbd/server: Advertise all contexts in response to bare LIST
7711c0
Bugzilla: 1691563
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Eric Blake <eblake@redhat.com>
7711c0
7711c0
The NBD spec, and even our code comment, says that if the client
7711c0
asks for NBD_OPT_LIST_META_CONTEXT with 0 queries, then we should
7711c0
reply with (a possibly-compressed representation of) ALL contexts
7711c0
that we are willing to let them try.  But commit 3d068aff forgot
7711c0
to advertise qemu:dirty-bitmap:FOO.
7711c0
7711c0
Signed-off-by: Eric Blake <eblake@redhat.com>
7711c0
Message-Id: <20181130023232.3079982-2-eblake@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
(cherry picked from commit e31d802479df9daff1994a7ed1e36bbc5bb19d03)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 nbd/server.c | 1 +
7711c0
 1 file changed, 1 insertion(+)
7711c0
7711c0
diff --git a/nbd/server.c b/nbd/server.c
7711c0
index e8fd6b4..abf03e8 100644
7711c0
--- a/nbd/server.c
7711c0
+++ b/nbd/server.c
7711c0
@@ -978,6 +978,7 @@ static int nbd_negotiate_meta_queries(NBDClient *client,
7711c0
     if (client->opt == NBD_OPT_LIST_META_CONTEXT && !nb_queries) {
7711c0
         /* enable all known contexts */
7711c0
         meta->base_allocation = true;
7711c0
+        meta->bitmap = !!meta->exp->export_bitmap;
7711c0
     } else {
7711c0
         for (i = 0; i < nb_queries; ++i) {
7711c0
             ret = nbd_negotiate_meta_query(client, meta, errp);
7711c0
-- 
7711c0
1.8.3.1
7711c0