Skip to content

Commit

Permalink
parallels: mark driver as supporting CBT
Browse files Browse the repository at this point in the history
Parallels driver indeed support Parallels Dirty Bitmap Feature in
read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap()
callback which always return 1 to indicate that.

This will allow to copy CBT from Parallels image with qemu-img.

Note: read-write support is signalled through
bdrv_co_can_store_new_dirty_bitmap() and is different.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
  • Loading branch information
Denis V. Lunev committed Sep 21, 2023
1 parent bb16991 commit 73f3e13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions block/parallels.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,11 @@ static void parallels_close(BlockDriverState *bs)
error_free(s->migration_blocker);
}

static bool parallels_is_support_dirty_bitmaps(BlockDriverState *bs)
{
return 1;
}

static BlockDriver bdrv_parallels = {
.format_name = "parallels",
.instance_size = sizeof(BDRVParallelsState),
Expand All @@ -1256,6 +1261,7 @@ static BlockDriver bdrv_parallels = {
.supports_backing = true,

.bdrv_has_zero_init = bdrv_has_zero_init_1,
.bdrv_supports_persistent_dirty_bitmap = parallels_is_support_dirty_bitmaps,

.bdrv_probe = parallels_probe,
.bdrv_open = parallels_open,
Expand Down

0 comments on commit 73f3e13

Please sign in to comment.