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