[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 54/56] block/block-copy: block_copy_state_new(): drop extra argume
From: |
Hanna Reitz |
Subject: |
[PULL 54/56] block/block-copy: block_copy_state_new(): drop extra arguments |
Date: |
Wed, 1 Sep 2021 17:16:17 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
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>
---
include/block/block-copy.h | 1 -
block/block-copy.c | 5 ++---
block/copy-before-write.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index b8a2d63545..99370fa38b 100644
--- a/include/block/block-copy.h
+++ b/include/block/block-copy.h
@@ -25,7 +25,6 @@ typedef struct BlockCopyState BlockCopyState;
typedef struct BlockCopyCallState BlockCopyCallState;
BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
- bool use_copy_range, bool compress,
Error **errp);
/* Function should be called prior any actual copy request */
diff --git a/block/block-copy.c b/block/block-copy.c
index 443261e4e4..ce116318b5 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -384,8 +384,7 @@ static int64_t
block_copy_calculate_cluster_size(BlockDriverState *target,
}
BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
- bool use_copy_range,
- bool compress, Error **errp)
+ Error **errp)
{
BlockCopyState *s;
int64_t cluster_size;
@@ -434,7 +433,7 @@ BlockCopyState *block_copy_state_new(BdrvChild *source,
BdrvChild *target,
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);
qemu_co_mutex_init(&s->lock);
diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index 2cd68b480a..2a5e57deca 100644
--- a/block/copy-before-write.c
+++ b/block/copy-before-write.c
@@ -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) &
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) {
error_prepend(errp, "Cannot create block-copy-state: ");
return -EINVAL;
--
2.31.1
- [PULL 44/56] python/qemu/machine: QEMUMachine: improve qmp() method, (continued)
- [PULL 44/56] python/qemu/machine: QEMUMachine: improve qmp() method, Hanna Reitz, 2021/09/01
- [PULL 45/56] python:QEMUMachine: template typing for self returning methods, Hanna Reitz, 2021/09/01
- [PULL 46/56] iotests/222: fix pylint and mypy complains, Hanna Reitz, 2021/09/01
- [PULL 47/56] iotests/222: constantly use single quotes for strings, Hanna Reitz, 2021/09/01
- [PULL 48/56] iotests: move 222 to tests/image-fleecing, Hanna Reitz, 2021/09/01
- [PULL 50/56] iotests/image-fleecing: proper source device, Hanna Reitz, 2021/09/01
- [PULL 49/56] iotests.py: hmp_qemu_io: support qdev, Hanna Reitz, 2021/09/01
- [PULL 52/56] iotests/image-fleecing: prepare for adding new test-case, Hanna Reitz, 2021/09/01
- [PULL 51/56] iotests/image-fleecing: rename tgt_node, Hanna Reitz, 2021/09/01
- [PULL 53/56] iotests/image-fleecing: add test-case for copy-before-write filter, Hanna Reitz, 2021/09/01
- [PULL 54/56] block/block-copy: block_copy_state_new(): drop extra arguments,
Hanna Reitz <=
- [PULL 55/56] block/export/fuse.c: fix fuse-lseek on uclibc or musl, Hanna Reitz, 2021/09/01
- [PULL 56/56] block/file-win32: add reopen handlers, Hanna Reitz, 2021/09/01
- Re: [PULL 00/56] Block patches, Peter Maydell, 2021/09/02
- Re: [PULL 00/56] Block patches, Peter Maydell, 2021/09/02