OSDN Git Service

block/block-copy: use aio-task-pool API
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 29 Apr 2020 13:08:47 +0000 (16:08 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 5 May 2020 12:03:28 +0000 (14:03 +0200)
commit4ce5dd3e9b5ee0fac18625860eb3727399ee965e
tree52b2cca6d7a47926a4f61464c8fa68186c0770bf
parent42ac214406e092038b13f02c2ff9768d4dd41e1b
block/block-copy: use aio-task-pool API

Run block_copy iterations in parallel in aio tasks.

Changes:
  - BlockCopyTask becomes aio task structure. Add zeroes field to pass
    it to block_copy_do_copy
  - add call state - it's a state of one call of block_copy(), shared
    between parallel tasks. For now used only to keep information about
    first error: is it read or not.
  - convert block_copy_dirty_clusters to aio-task loop.

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