[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 20/23] block/block-copy: drop unused argument of block_copy()
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 20/23] block/block-copy: drop unused argument of block_copy() |
Date: |
Sun, 17 Jan 2021 00:47:02 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
include/block/block-copy.h | 2 +-
block/backup-top.c | 2 +-
block/block-copy.c | 10 ++--------
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index 1cbea0b79b..338f2ea7fd 100644
--- a/include/block/block-copy.h
+++ b/include/block/block-copy.h
@@ -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
diff --git a/block/backup-top.c b/block/backup-top.c
index 779956ddc2..6e7e7bf340 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, true, NULL);
+ return block_copy(s->bcs, off, end - off, true);
}
static int coroutine_fn backup_top_co_pdiscard(BlockDriverState *bs,
diff --git a/block/block-copy.c b/block/block-copy.c
index 2ea8b28684..39ae481c8b 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -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)
--
2.29.2
- [PATCH v4 04/23] block/block-copy: add max_chunk and max_workers parameters, (continued)
- [PATCH v4 04/23] block/block-copy: add max_chunk and max_workers parameters, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 07/23] block/block-copy: add block_copy_cancel, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 11/23] iotests: 56: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 08/23] blockjob: add set_speed to BlockJobDriver, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 19/23] block/block-copy: drop unused block_copy_set_progress_callback(), Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 12/23] iotests: 185: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 13/23] iotests: 219: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 16/23] block/backup: drop extra gotos from backup_run(), Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 23/23] simplebench: add bench-backup.py, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 20/23] block/block-copy: drop unused argument of block_copy(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH v4 15/23] block/block-copy: make progress_bytes_callback optional, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 21/23] simplebench/bench_block_job: use correct shebang line with python3, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 18/23] qapi: backup: disable copy_range by default, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 22/23] simplebench: bench_block_job: add cmd_options argument, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 17/23] backup: move to block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 14/23] iotests: 257: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- Re: [PATCH v4 00/23] backup performance: block_status + async, Max Reitz, 2021/01/18
- Re: [PATCH v4 00/23] backup performance: block_status + async, Max Reitz, 2021/01/19