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>
master
John Snow 2018-10-29 16:23:16 -04:00
parent b27a6b8b32
commit d9782022bd
1 changed files with 2 additions and 2 deletions

View 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;
}