]> Git Repo - qemu.git/commit - block.c
block: Drain recursively with a single BDRV_POLL_WHILE()
authorKevin Wolf <[email protected]>
Fri, 23 Mar 2018 11:40:41 +0000 (12:40 +0100)
committerKevin Wolf <[email protected]>
Mon, 18 Jun 2018 13:03:25 +0000 (15:03 +0200)
commitfe4f0614ef9e361dae12012d3c400657444836cf
tree8a2fe7988f189a123c456e204bad9f1292f934de
parent4c8158e359d194394c64acd21caf5e3f3f3141c2
block: Drain recursively with a single BDRV_POLL_WHILE()

Anything can happen inside BDRV_POLL_WHILE(), including graph
changes that may interfere with its callers (e.g. child list iteration
in recursive callers of bdrv_do_drained_begin).

Switch to a single BDRV_POLL_WHILE() call for the whole subtree at the
end of bdrv_do_drained_begin() to avoid such effects. The recursion
happens now inside the loop condition. As the graph can only change
between bdrv_drain_poll() calls, but not inside of it, doing the
recursion here is safe.

Signed-off-by: Kevin Wolf <[email protected]>
block.c
block/io.c
include/block/block.h
This page took 0.024798 seconds and 4 git commands to generate.