47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 61a642fa86014af236c1ea5ae84a9bbffcf67e6f Mon Sep 17 00:00:00 2001
|
|
From: John Snow <jsnow@redhat.com>
|
|
Date: Tue, 20 Nov 2018 18:18:21 +0000
|
|
Subject: [PATCH 27/35] nbd: forbid use of frozen bitmaps
|
|
|
|
RH-Author: John Snow <jsnow@redhat.com>
|
|
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 <lvivier@redhat.com>
|
|
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
|
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 <jsnow@redhat.com>
|
|
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
Message-id: 20181002230218.13949-7-jsnow@redhat.com
|
|
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
(cherry picked from commit d9782022bda7f8eccaf961044e9efe980dc90c04)
|
|
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
---
|
|
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
|
|
|