summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorMax Reitz2019-07-19 11:26:11 +0200
committerKevin Wolf2019-07-19 13:19:16 +0200
commit8e1da77e6e4866876236d0f0c7b02dea87efd2a4 (patch)
treefb8b31c7f5551bd6c9eff749679efe99822b7e90 /include/block/block.h
parenttests: Add job commit by drained_end test (diff)
downloadqemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.tar.gz
qemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.tar.xz
qemu-8e1da77e6e4866876236d0f0c7b02dea87efd2a4.zip
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 'include/block/block.h')
0 files changed, 0 insertions, 0 deletions