aboutsummaryrefslogtreecommitdiff
path: root/nbd
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2018-10-29 16:23:16 -0400
committerJohn Snow <jsnow@redhat.com>2018-10-29 16:23:16 -0400
commitd9782022bda7f8eccaf961044e9efe980dc90c04 (patch)
tree7956dc7b9c2f121ae9ec02721d284277c61abf6c /nbd
parentb27a6b8b329a8dcbab9dc1af45586f7585f3d47b (diff)
nbd: forbid use of frozen bitmaps
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>
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nbd/server.c b/nbd/server.c
index a1eda0114f..4e8f5ae51b 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -2456,8 +2456,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;
}