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

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