Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
include/block/block-copy.h | 3 +--
block/backup-top.c | 2 +-
block/block-copy.c | 11 ++---------
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index a3e11d3fa2..760dfc9eae 100644
--- a/include/block/block-copy.h
+++ b/include/block/block-copy.h
@@ -35,8 +35,7 @@ void block_copy_state_free(BlockCopyState *s);
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 *error_is_read);
+int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t bytes);
/*
* Run block-copy in a coroutine, return state pointer. If finished early
diff --git a/block/backup-top.c b/block/backup-top.c
index 0a09544c76..f4230aded4 100644
--- a/block/backup-top.c
+++ b/block/backup-top.c
@@ -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, NULL);
+ return block_copy(s->bcs, off, end - off);
}
static int coroutine_fn backup_top_co_pdiscard(BlockDriverState *bs,
diff --git a/block/block-copy.c b/block/block-copy.c
index 6a9d891b63..6cb721cc26 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -713,8 +713,7 @@ static int coroutine_fn
block_copy_common(BlockCopyCallState *call_state)
return ret;
}
-int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t bytes,
- bool *error_is_read)
+int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t bytes)
{
BlockCopyCallState call_state = {
.s = s,
@@ -723,13 +722,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)
--
2.21.0