@@ -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
@@ -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,
@@ -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)