aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2022-11-18 18:40:57 +0100
committerKevin Wolf <kwolf@redhat.com>2022-12-15 16:07:42 +0100
commit7bce1c299834557bffd92294608ea528648cfe75 (patch)
tree41a31c914c47b45a2a8f1e88325affc3b56f47f4 /include
parent6d47eb0c8bf2d50682c7dccae74d24104076fe23 (diff)
downloadqemu-7bce1c299834557bffd92294608ea528648cfe75.zip
qemu-7bce1c299834557bffd92294608ea528648cfe75.tar.gz
qemu-7bce1c299834557bffd92294608ea528648cfe75.tar.bz2
test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end()
We want to change .bdrv_co_drained_begin/end() back to be non-coroutine callbacks, so in preparation, avoid yielding in their implementation. This does almost the same as the existing logic in bdrv_drain_invoke(), by creating and entering coroutines internally. However, since the test case is by far the heaviest user of coroutine code in drain callbacks, it is preferable to have the complexity in the test case rather than the drain core, which is already complicated enough without this. The behaviour for bdrv_drain_begin() is unchanged because we increase bs->in_flight and this is still polled. However, bdrv_drain_end() doesn't wait for the spawned coroutine to complete any more. This is fine, we don't rely on bdrv_drain_end() restarting all operations immediately before the next aio_poll(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20221118174110.55183-3-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions