diff options
author | John Snow <jsnow@redhat.com> | 2019-03-12 12:05:49 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2019-03-12 12:05:49 -0400 |
commit | a54a0c113b333aee49e484758fab7f1f1c593dd3 (patch) | |
tree | 8cfdf06740076e8fa58f5c10e589681d529fc702 | |
parent | 3ae96d66840f72ef54902d012dbdf87ef4e9fe0c (diff) | |
download | qemu-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } } |