cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
26ba25
From 61a642fa86014af236c1ea5ae84a9bbffcf67e6f Mon Sep 17 00:00:00 2001
26ba25
From: John Snow <jsnow@redhat.com>
26ba25
Date: Tue, 20 Nov 2018 18:18:21 +0000
26ba25
Subject: [PATCH 27/35] nbd: forbid use of frozen bitmaps
26ba25
26ba25
RH-Author: John Snow <jsnow@redhat.com>
26ba25
Message-id: <20181120181828.15132-18-jsnow@redhat.com>
26ba25
Patchwork-id: 83071
26ba25
O-Subject: [RHEL8/rhel qemu-kvm PATCH 17/24] nbd: forbid use of frozen bitmaps
26ba25
Bugzilla: 1518989
26ba25
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
26ba25
RH-Acked-by: Max Reitz <mreitz@redhat.com>
26ba25
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
26ba25
Whether it's "locked" or "frozen", it's in use and should
26ba25
not be allowed for the purposes of this operation.
26ba25
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
26ba25
Message-id: 20181002230218.13949-7-jsnow@redhat.com
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
(cherry picked from commit d9782022bda7f8eccaf961044e9efe980dc90c04)
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
26ba25
---
26ba25
 nbd/server.c | 4 ++--
26ba25
 1 file changed, 2 insertions(+), 2 deletions(-)
26ba25
26ba25
diff --git a/nbd/server.c b/nbd/server.c
26ba25
index 1ce3f44..e094300 100644
26ba25
--- a/nbd/server.c
26ba25
+++ b/nbd/server.c
26ba25
@@ -2435,8 +2435,8 @@ void nbd_export_bitmap(NBDExport *exp, const char *bitmap,
26ba25
         return;
26ba25
     }
26ba25
 
26ba25
-    if (bdrv_dirty_bitmap_qmp_locked(bm)) {
26ba25
-        error_setg(errp, "Bitmap '%s' is locked", bitmap);
26ba25
+    if (bdrv_dirty_bitmap_user_locked(bm)) {
26ba25
+        error_setg(errp, "Bitmap '%s' is in use", bitmap);
26ba25
         return;
26ba25
     }
26ba25
 
26ba25
-- 
26ba25
1.8.3.1
26ba25