[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 19/23] block/block-copy: drop unused block_copy_set_progress_c
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 19/23] block/block-copy: drop unused block_copy_set_progress_callback() |
Date: |
Sun, 17 Jan 2021 00:47:01 +0300 |
Drop unused code.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
include/block/block-copy.h | 6 ------
block/block-copy.c | 15 ---------------
2 files changed, 21 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index 7821850f88..1cbea0b79b 100644
--- a/include/block/block-copy.h
+++ b/include/block/block-copy.h
@@ -18,7 +18,6 @@
#include "block/block.h"
#include "qemu/co-shared-resource.h"
-typedef void (*ProgressBytesCallbackFunc)(int64_t bytes, void *opaque);
typedef void (*BlockCopyAsyncCallbackFunc)(void *opaque);
typedef struct BlockCopyState BlockCopyState;
typedef struct BlockCopyCallState BlockCopyCallState;
@@ -28,11 +27,6 @@ BlockCopyState *block_copy_state_new(BdrvChild *source,
BdrvChild *target,
BdrvRequestFlags write_flags,
Error **errp);
-void block_copy_set_progress_callback(
- BlockCopyState *s,
- ProgressBytesCallbackFunc progress_bytes_callback,
- void *progress_opaque);
-
void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm);
void block_copy_state_free(BlockCopyState *s);
diff --git a/block/block-copy.c b/block/block-copy.c
index 61d82d9a1c..2ea8b28684 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -110,9 +110,6 @@ typedef struct BlockCopyState {
bool skip_unallocated;
ProgressMeter *progress;
- /* progress_bytes_callback: called when some copying progress is done. */
- ProgressBytesCallbackFunc progress_bytes_callback;
- void *progress_opaque;
SharedResource *mem;
@@ -298,15 +295,6 @@ BlockCopyState *block_copy_state_new(BdrvChild *source,
BdrvChild *target,
return s;
}
-void block_copy_set_progress_callback(
- BlockCopyState *s,
- ProgressBytesCallbackFunc progress_bytes_callback,
- void *progress_opaque)
-{
- s->progress_bytes_callback = progress_bytes_callback;
- s->progress_opaque = progress_opaque;
-}
-
void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm)
{
s->progress = pm;
@@ -454,9 +442,6 @@ static coroutine_fn int block_copy_task_entry(AioTask *task)
t->call_state->error_is_read = error_is_read;
} else {
progress_work_done(t->s->progress, t->bytes);
- if (t->s->progress_bytes_callback) {
- t->s->progress_bytes_callback(t->bytes, t->s->progress_opaque);
- }
}
co_put_to_shres(t->s->mem, t->bytes);
block_copy_task_end(t, ret);
--
2.29.2
- [PATCH v4 03/23] block/block-copy: implement block_copy_async, (continued)
- [PATCH v4 03/23] block/block-copy: implement block_copy_async, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 06/23] block/block-copy: add ratelimit to block-copy, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 05/23] block/block-copy: add list of all call-states, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 09/23] job: call job_enter from job_pause, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [PATCH v4 10/23] qapi: backup: add max-chunk and max-workers to x-perf struct, Vladimir Sementsov-Ogievskiy, 2021/01/16
- [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 <=
- [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, 2021/01/16
- [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