28.04.2020 10:30, Max Reitz wrote:
On 25.03.20 14:46, Vladimir Sementsov-Ogievskiy wrote:
We are going to use aio-task-pool API and extend in-flight request
structure to be a successor of AioTask, so rename things appropriately.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
block/block-copy.c | 99 +++++++++++++++++++++++-----------------------
1 file changed, 49 insertions(+), 50 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 05227e18bf..61d1d26991 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
[...]
-static void coroutine_fn block_copy_inflight_req_shrink(BlockCopyState *s,
- BlockCopyInFlightReq *req, int64_t new_bytes)
+static void coroutine_fn block_copy_task_shrink(BlockCopyState *s,
+ BlockCopyTask *task,
+ int64_t new_bytes)
{
- if (new_bytes == req->bytes) {
+ if (new_bytes == task->bytes) {
return;
}
- assert(new_bytes > 0 && new_bytes < req->bytes);
+ assert(new_bytes > 0 && new_bytes < task->bytes);
- s->in_flight_bytes -= req->bytes - new_bytes;
+ s->in_flight_bytes -= task->bytes - new_bytes;
bdrv_set_dirty_bitmap(s->copy_bitmap,
- req->offset + new_bytes, req->bytes - new_bytes);
+ task->offset + new_bytes, task->bytes - new_bytes);
+ s->in_flight_bytes -= task->bytes - new_bytes;
This line doesn’t seem right.
Hmm yes.. A kind of copy-paste or rebase artifact.
--
Best regards,
Vladimir