block/block-copy: block_copy_state_new(): drop extra arguments

The only caller pass copy_range and compress both false. Let's just
drop these arguments.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210824083856.17408-35-vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2021-08-24 11:38:56 +03:00 committed by Hanna Reitz
parent c060598569
commit abde8ac2a5
3 changed files with 3 additions and 5 deletions

View File

@ -384,8 +384,7 @@ static int64_t block_copy_calculate_cluster_size(BlockDriverState *target,
} }
BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
bool use_copy_range, Error **errp)
bool compress, Error **errp)
{ {
BlockCopyState *s; BlockCopyState *s;
int64_t cluster_size; int64_t cluster_size;
@ -434,7 +433,7 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
cluster_size), cluster_size),
}; };
block_copy_set_copy_opts(s, use_copy_range, compress); block_copy_set_copy_opts(s, false, false);
ratelimit_init(&s->rate_limit); ratelimit_init(&s->rate_limit);
qemu_co_mutex_init(&s->lock); qemu_co_mutex_init(&s->lock);

View File

@ -170,7 +170,7 @@ static int cbw_open(BlockDriverState *bs, QDict *options, int flags,
((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK) & ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK) &
bs->file->bs->supported_zero_flags); bs->file->bs->supported_zero_flags);
s->bcs = block_copy_state_new(bs->file, s->target, false, false, errp); s->bcs = block_copy_state_new(bs->file, s->target, errp);
if (!s->bcs) { if (!s->bcs) {
error_prepend(errp, "Cannot create block-copy-state: "); error_prepend(errp, "Cannot create block-copy-state: ");
return -EINVAL; return -EINVAL;

View File

@ -25,7 +25,6 @@ typedef struct BlockCopyState BlockCopyState;
typedef struct BlockCopyCallState BlockCopyCallState; typedef struct BlockCopyCallState BlockCopyCallState;
BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
bool use_copy_range, bool compress,
Error **errp); Error **errp);
/* Function should be called prior any actual copy request */ /* Function should be called prior any actual copy request */