[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/20] block/block-copy: drop unused argument of block_copy()
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v2 18/20] block/block-copy: drop unused argument of block_copy() |
Date: |
Mon, 1 Jun 2020 21:11:16 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
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
- [PATCH v2 07/20] block/block-copy: add ratelimit to block-copy, (continued)
- [PATCH v2 07/20] block/block-copy: add ratelimit to block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 08/20] block/block-copy: add block_copy_cancel, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 09/20] blockjob: add set_speed to BlockJobDriver, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 10/20] job: call job_enter from job_user_pause, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 12/20] iotests: 56: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 14/20] iotests: 185: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 15/20] iotests: 219: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 13/20] iotests: 129: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 18/20] block/block-copy: drop unused argument of block_copy(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH v2 17/20] backup: move to block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 19/20] simplebench: bench_block_job: add cmd_options argument, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 16/20] iotests: 257: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/06/01
- [PATCH v2 20/20] simplebench: add bench-backup.py, Vladimir Sementsov-Ogievskiy, 2020/06/01
- Re: [PATCH v2 00/20] backup performance: block_status + async, Vladimir Sementsov-Ogievskiy, 2020/06/01
- Re: [PATCH v2 00/20] backup performance: block_status + async, no-reply, 2020/06/01
- Re: [PATCH v2 00/20] backup performance: block_status + async, no-reply, 2020/06/01