diff options
author | Max Reitz <mreitz@redhat.com> | 2019-07-19 11:26:11 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-07-19 13:19:16 +0200 |
commit | 8e1da77e6e4866876236d0f0c7b02dea87efd2a4 (patch) | |
tree | fb8b31c7f5551bd6c9eff749679efe99822b7e90 /python/qemu/machine.py | |
parent | 8e4428106aecb05a55c8cc97d927adaab7454b71 (diff) | |
download | qemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.zip qemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.tar.gz qemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.tar.bz2 |
block: Add @drained_end_counter
Callers can now pass a pointer to an integer that bdrv_drain_invoke()
(and its recursive callees) will increment for every
bdrv_drain_invoke_entry() operation they schedule.
bdrv_drain_invoke_entry() in turn will decrement it once it has invoked
BlockDriver.bdrv_co_drain_end().
We use atomic operations to access the pointee, because the
bdrv_do_drained_end() caller may wish to end drained sections for
multiple nodes in different AioContexts (bdrv_drain_all_end() does, for
example).
This is the first step to moving the polling for BdrvCoDrainData.done to
become true out of bdrv_drain_invoke() and into the root drained_end
function.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'python/qemu/machine.py')
0 files changed, 0 insertions, 0 deletions