block/mirror: Use CoQueue to wait on in-flight ops
commit12aa40822daf0ab13059b27b29a83ded43bae3bb
authorMax Reitz <mreitz@redhat.com>
Wed, 13 Jun 2018 18:18:12 +0000 (13 20:18 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 18 Jun 2018 15:04:52 +0000 (18 17:04 +0200)
tree5c9bf60375dbf84d9b4fa017b8ac838e50c18822
parent2e1990b26e5aa1ba1a730aa6281df123bb7a71b6
block/mirror: Use CoQueue to wait on in-flight ops

Attach a CoQueue to each in-flight operation so if we need to wait for
any we can use it to wait instead of just blindly yielding and hoping
for some operation to wake us.

A later patch will use this infrastructure to allow requests accessing
the same area of the virtual disk to specifically wait for each other.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20180613181823.13618-4-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/mirror.c