[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/6] block/block-copy: rename in-flight requests to tasks
From: |
Max Reitz |
Subject: |
Re: [PATCH v2 1/6] block/block-copy: rename in-flight requests to tasks |
Date: |
Tue, 28 Apr 2020 09:30:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
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 <address@hidden>
> ---
> 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.
(The rest does.)
Max
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH v2 1/6] block/block-copy: rename in-flight requests to tasks,
Max Reitz <=