]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
block/block-copy: block_copy_state_new(): drop extra arguments
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 24 Aug 2021 08:38:56 +0000 (11:38 +0300)
committerHanna Reitz <hreitz@redhat.com>
Wed, 1 Sep 2021 12:38:08 +0000 (14:38 +0200)
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>
block/block-copy.c
block/copy-before-write.c
include/block/block-copy.h

index 443261e4e47a214240e74d5611d40d45582ef4d7..ce116318b573e011f961055c902cec89c3ec9586 100644 (file)
@@ -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);
index 2cd68b480ab38326f7de11a29e0430295214bb8f..2a5e57decaa1a63e13f3e21de4b4da00d7daa4c6 100644 (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) &
              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;
index b8a2d6354542856c9117a5eea303f5a2315348e8..99370fa38bef577fdd0e2f617cbb96093963196d 100644 (file)
@@ -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 */