On Wed, Apr 11, 2018 at 06:39:25PM +0200, Kevin Wolf wrote: > All involved nodes are already idle, we called bdrv_do_draine_begin() on > them. > > The comment in the code suggested that this were not correct because the > completion of a request on one node could spawn a new request on a > different node (which might have been drained before, so we wouldn't > drain the new request). In reality, new requests to different nodes > aren't spawned out of nothing, but only in the context of a parent > request, and they aren't submitted to random nodes, but only to child > nodes. As long as we still poll for the completion of the parent request > (which we do), draining each root node separately is good enough. > > Remove the additional polling code from bdrv_drain_all_begin() and > replace it with an assertion that all nodes are already idle after we > drained them separately. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/io.c | 41 ++++++++++++----------------------------- > 1 file changed, 12 insertions(+), 29 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature