diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2024-03-13 18:28:20 +0300 |
---|---|---|
committer | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2024-05-28 15:52:15 +0300 |
commit | 006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182 (patch) | |
tree | f40283437757be89d85949e06eff6bde9dbe48b8 /include | |
parent | 507175197b06a24beb2369abe95b00172741c457 (diff) | |
download | qemu-006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182.zip qemu-006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182.tar.gz qemu-006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182.tar.bz2 |
block/copy-before-write: create block_copy bitmap in filter node
Currently block_copy creates copy_bitmap in source node. But that is in
bad relation with .independent_close=true of copy-before-write filter:
source node may be detached and removed before .bdrv_close() handler
called, which should call block_copy_state_free(), which in turn should
remove copy_bitmap.
That's all not ideal: it would be better if internal bitmap of
block-copy object is not attached to any node. But that is not possible
now.
The simplest solution is just create copy_bitmap in filter node, where
anyway two other bitmaps are created.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-4-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block-copy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 0700953..8b41643 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -25,6 +25,7 @@ typedef struct BlockCopyState BlockCopyState; typedef struct BlockCopyCallState BlockCopyCallState; BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, + BlockDriverState *copy_bitmap_bs, const BdrvDirtyBitmap *bitmap, Error **errp); |