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