aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2019-03-12 12:05:49 -0400
committerJohn Snow <jsnow@redhat.com>2019-03-12 12:05:49 -0400
commita54a0c113b333aee49e484758fab7f1f1c593dd3 (patch)
tree8cfdf06740076e8fa58f5c10e589681d529fc702
parent3ae96d66840f72ef54902d012dbdf87ef4e9fe0c (diff)
downloadqemu-a54a0c113b333aee49e484758fab7f1f1c593dd3.zip
qemu-a54a0c113b333aee49e484758fab7f1f1c593dd3.tar.gz
qemu-a54a0c113b333aee49e484758fab7f1f1c593dd3.tar.bz2
block/dirty-bitmaps: prohibit readonly bitmaps for backups
drive and blockdev backup cannot use readonly bitmaps, because the sync=incremental mechanism actually edits the bitmaps on success. If you really want to do this operation, use a copied bitmap. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190301191545.8728-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
-rw-r--r--blockdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index 5021f81..dd841fc 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3535,7 +3535,7 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn,
bdrv_unref(target_bs);
goto out;
}
- if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_ALLOW_RO, errp)) {
+ if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_DEFAULT, errp)) {
goto out;
}
}
@@ -3645,7 +3645,7 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, JobTxn *txn,
error_setg(errp, "Bitmap '%s' could not be found", backup->bitmap);
goto out;
}
- if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_ALLOW_RO, errp)) {
+ if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_DEFAULT, errp)) {
goto out;
}
}