[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/21] parallels: mark driver as supporting CBT
From: |
Denis V. Lunev |
Subject: |
[PATCH 02/21] parallels: mark driver as supporting CBT |
Date: |
Fri, 15 Sep 2023 20:41:09 +0200 |
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>
---
block/parallels.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index 2ebd8e1301..428f72de1c 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -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),
@@ -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,
--
2.34.1
- Re: [PATCH 06/21] parallels: refactor path when we need to re-check image in parallels_open, (continued)
- [PATCH 03/21] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts, Denis V. Lunev, 2023/09/15
- [PATCH 02/21] parallels: mark driver as supporting CBT, Denis V. Lunev, 2023/09/15
- [PATCH 08/21] tests: ensure that image validation will not cure the corruption, Denis V. Lunev, 2023/09/15
- [PATCH 01/21] parallels: fix formatting in bdrv_parallels initialization, Denis V. Lunev, 2023/09/15
- [PATCH 02/21] parallels: mark driver as supporting CBT,
Denis V. Lunev <=
- [PATCH 07/21] parallels: create mark_used() helper which sets bit in used bitmap, Denis V. Lunev, 2023/09/15
- [PATCH 05/21] parallels: return earlier from parallels_open() function on error, Denis V. Lunev, 2023/09/15
- [PATCH 09/21] parallels: fix broken parallels_check_data_off(), Denis V. Lunev, 2023/09/15
- [PATCH 16/21] parallels: naive implementation of allocate_clusters with used bitmap, Denis V. Lunev, 2023/09/15