diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-08-24 11:38:31 +0300 |
---|---|---|
committer | Hanna Reitz <hreitz@redhat.com> | 2021-09-01 14:03:11 +0200 |
commit | b518e9e9ef7a28aa559a05d44dd734e83ae75f9d (patch) | |
tree | 11eb3251f94ac482e3a4c4a0bd368bb71896de03 /include | |
parent | 2a6511dfeb0d1bd10211b264177afbc360f9bd9d (diff) | |
download | qemu-b518e9e9ef7a28aa559a05d44dd734e83ae75f9d.zip qemu-b518e9e9ef7a28aa559a05d44dd734e83ae75f9d.tar.gz qemu-b518e9e9ef7a28aa559a05d44dd734e83ae75f9d.tar.bz2 |
block/backup: move cluster size calculation to block-copy
The main consumer of cluster-size is block-copy. Let's calculate it
here instead of passing through backup-top.
We are going to publish copy-before-write filter soon, so it will be
created through options. But we don't want for now to make explicit
option for cluster-size, let's continue to calculate it automatically.
So, now is the time to get rid of cluster_size argument for
bdrv_cbw_append().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210824083856.17408-10-vsementsov@virtuozzo.com>
[hreitz: Add qemu/error-report.h include to block/block-copy.c]
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block-copy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/block/block-copy.h b/include/block/block-copy.h index dca6c4c..b8a2d63 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -25,8 +25,8 @@ typedef struct BlockCopyState BlockCopyState; typedef struct BlockCopyCallState BlockCopyCallState; BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, - int64_t cluster_size, bool use_copy_range, - bool compress, Error **errp); + bool use_copy_range, bool compress, + Error **errp); /* Function should be called prior any actual copy request */ void block_copy_set_copy_opts(BlockCopyState *s, bool use_copy_range, @@ -91,6 +91,7 @@ void block_copy_kick(BlockCopyCallState *call_state); void block_copy_call_cancel(BlockCopyCallState *call_state); BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s); +int64_t block_copy_cluster_size(BlockCopyState *s); void block_copy_set_skip_unallocated(BlockCopyState *s, bool skip); #endif /* BLOCK_COPY_H */ |