block/backup: move cluster size calculation to block-copy
commitb518e9e9ef7a28aa559a05d44dd734e83ae75f9d
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 24 Aug 2021 08:38:31 +0000 (24 11:38 +0300)
committerHanna Reitz <hreitz@redhat.com>
Wed, 1 Sep 2021 12:03:11 +0000 (1 14:03 +0200)
tree11eb3251f94ac482e3a4c4a0bd368bb71896de03
parent2a6511dfeb0d1bd10211b264177afbc360f9bd9d
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>
block/backup.c
block/block-copy.c
block/copy-before-write.c
block/copy-before-write.h
include/block/block-copy.h