]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: ignore_bds_parents parameter for drain functions
authorKevin Wolf <kwolf@redhat.com>
Tue, 29 May 2018 15:17:45 +0000 (17:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 Jun 2018 13:03:25 +0000 (15:03 +0200)
commit6cd5c9d7b2df93ef54144f170d4c908934a4767f
tree7b7787f054ba88d540e0741f03187aece7b921f1
parentc8ca33d06def97d909a8511377b82994ae4e5981
block: ignore_bds_parents parameter for drain functions

In the future, bdrv_drained_all_begin/end() will drain all invidiual
nodes separately rather than whole subtrees. This means that we don't
want to propagate the drain to all parents any more: If the parent is a
BDS, it will already be drained separately. Recursing to all parents is
unnecessary work and would make it an O(n²) operation.

Prepare the drain function for the changed drain_all by adding an
ignore_bds_parents parameter to the internal implementation that
prevents the propagation of the drain to BDS parents. We still (have to)
propagate it to non-BDS parents like BlockBackends or Jobs because those
are not drained separately.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/io.c
block/vvfat.c
include/block/block.h
include/block/block_int.h