[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 17/25] block/block-copy: make progress_bytes_callback optional
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v3 17/25] block/block-copy: make progress_bytes_callback optional |
Date: |
Mon, 26 Oct 2020 20:18:07 +0300 |
We are going to stop use of this callback in the following commit.
Still the callback handling code will be dropped in a separate commit.
So, for now let's make it optional.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block/block-copy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 82cf945693..61d82d9a1c 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -454,7 +454,9 @@ 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);
- t->s->progress_bytes_callback(t->bytes, t->s->progress_opaque);
+ 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.21.3
- [PATCH v3 07/25] block/block-copy: add ratelimit to block-copy, (continued)
- [PATCH v3 07/25] block/block-copy: add ratelimit to block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 10/25] job: call job_enter from job_user_pause, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 11/25] qapi: backup: add max-chunk and max-workers to x-perf struct, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 12/25] iotests: 56: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 14/25] iotests: 185: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 13/25] iotests: 129: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 15/25] iotests: 219: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 18/25] block/backup: drop extra gotos from backup_run(), Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 19/25] backup: move to block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 22/25] block/block-copy: drop unused argument of block_copy(), Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 17/25] block/block-copy: make progress_bytes_callback optional,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v3 20/25] qapi: backup: disable copy_range by default, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 23/25] simplebench/bench_block_job: use correct shebang line with python3, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 16/25] iotests: 257: prepare for backup over block-copy, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 21/25] block/block-copy: drop unused block_copy_set_progress_callback(), Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 24/25] simplebench: bench_block_job: add cmd_options argument, Vladimir Sementsov-Ogievskiy, 2020/10/26
- [PATCH v3 25/25] simplebench: add bench-backup.py, Vladimir Sementsov-Ogievskiy, 2020/10/26