block/block-copy: alloc task on each iteration
commitf13e60a973216edc1d793555607533305713c74d
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 29 Apr 2020 13:08:44 +0000 (29 16:08 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 5 May 2020 12:03:28 +0000 (5 14:03 +0200)
tree6d0264c593a219fc09cc62df1432c75c6a25051b
parente9407785cce67cab85a76727d393dbf7d924f6d7
block/block-copy: alloc task on each iteration

We are going to use aio-task-pool API, so tasks will be handled in
parallel. We need therefore separate allocated task on each iteration.
Introduce this logic now.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200429130847.28124-3-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/block-copy.c