OSDN Git Service

nbd: forbid use of frozen bitmaps
authorJohn Snow <jsnow@redhat.com>
Mon, 29 Oct 2018 20:23:16 +0000 (16:23 -0400)
committerJohn Snow <jsnow@redhat.com>
Mon, 29 Oct 2018 20:23:16 +0000 (16:23 -0400)
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>
nbd/server.c

index a1eda01..4e8f5ae 100644 (file)
@@ -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;
     }