]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block/block-copy: drop unused argument of block_copy()
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Sat, 16 Jan 2021 21:47:02 +0000 (00:47 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 26 Jan 2021 13:36:37 +0000 (14:36 +0100)
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-21-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/backup-top.c
block/block-copy.c
include/block/block-copy.h

index 779956ddc2fa8537c00ac934471dd10fd1e8a77e..6e7e7bf34047ab902f69616d6928f2b96dc5c6f9 100644 (file)
@@ -61,7 +61,7 @@ static coroutine_fn int backup_top_cbw(BlockDriverState *bs, uint64_t offset,
     off = QEMU_ALIGN_DOWN(offset, s->cluster_size);
     end = QEMU_ALIGN_UP(offset + bytes, s->cluster_size);
 
-    return block_copy(s->bcs, off, end - off, true, NULL);
+    return block_copy(s->bcs, off, end - off, true);
 }
 
 static int coroutine_fn backup_top_co_pdiscard(BlockDriverState *bs,
index 2ea8b286840c2ad819ac87572fb7de38fca9dc47..39ae481c8b4b74b936355854602a21a8e22283cc 100644 (file)
@@ -723,7 +723,7 @@ static int coroutine_fn block_copy_common(BlockCopyCallState *call_state)
 }
 
 int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t bytes,
-                            bool ignore_ratelimit, bool *error_is_read)
+                            bool ignore_ratelimit)
 {
     BlockCopyCallState call_state = {
         .s = s,
@@ -733,13 +733,7 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t bytes,
         .max_workers = BLOCK_COPY_MAX_WORKERS,
     };
 
-    int ret = block_copy_common(&call_state);
-
-    if (error_is_read && ret < 0) {
-        *error_is_read = call_state.error_is_read;
-    }
-
-    return ret;
+    return block_copy_common(&call_state);
 }
 
 static void coroutine_fn block_copy_async_co_entry(void *opaque)
index 1cbea0b79b37090e6a4c2a2d6a1c51e73daf8fb2..338f2ea7fdf6360ae69a6c4480c1bbd860ff2f29 100644 (file)
@@ -35,7 +35,7 @@ int64_t block_copy_reset_unallocated(BlockCopyState *s,
                                      int64_t offset, int64_t *count);
 
 int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t bytes,
-                            bool ignore_ratelimit, bool *error_is_read);
+                            bool ignore_ratelimit);
 
 /*
  * Run block-copy in a coroutine, create corresponding BlockCopyCallState