Blame SOURCES/kvm-nbd-forbid-use-of-frozen-bitmaps.patch

7711c0
From 7017ebd29ae40208efdf2bad4846c220a6952b60 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 6 Feb 2019 22:12:36 +0100
7711c0
Subject: [PATCH 26/33] nbd: forbid use of frozen bitmaps
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190206221243.7407-17-jsnow@redhat.com>
7711c0
Patchwork-id: 84273
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 16/23] nbd: forbid use of frozen bitmaps
7711c0
Bugzilla: 1658343
7711c0
RH-Acked-by: Thomas Huth <thuth@redhat.com>
7711c0
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
7711c0
Whether it's "locked" or "frozen", it's in use and should
7711c0
not be allowed for the purposes of this operation.
7711c0
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Message-id: 20181002230218.13949-7-jsnow@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit d9782022bda7f8eccaf961044e9efe980dc90c04)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 nbd/server.c | 4 ++--
7711c0
 1 file changed, 2 insertions(+), 2 deletions(-)
7711c0
7711c0
diff --git a/nbd/server.c b/nbd/server.c
7711c0
index 1ce3f44..e094300 100644
7711c0
--- a/nbd/server.c
7711c0
+++ b/nbd/server.c
7711c0
@@ -2435,8 +2435,8 @@ void nbd_export_bitmap(NBDExport *exp, const char *bitmap,
7711c0
         return;
7711c0
     }
7711c0
 
7711c0
-    if (bdrv_dirty_bitmap_qmp_locked(bm)) {
7711c0
-        error_setg(errp, "Bitmap '%s' is locked", bitmap);
7711c0
+    if (bdrv_dirty_bitmap_user_locked(bm)) {
7711c0
+        error_setg(errp, "Bitmap '%s' is in use", bitmap);
7711c0
         return;
7711c0
     }
7711c0
 
7711c0
-- 
7711c0
1.8.3.1
7711c0