OSDN Git Service

block: Allow graph changes in subtree drained section
authorKevin Wolf <kwolf@redhat.com>
Mon, 18 Dec 2017 15:05:48 +0000 (16:05 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Dec 2017 14:05:32 +0000 (15:05 +0100)
commitd736f119dae6d292e8d60f2e02fa51a79524113e
treed43428b92070b16badcd30678dde7974e0be02ac
parent27e64474a384e68ca928fa875930b921b53d61f4
block: Allow graph changes in subtree drained section

We need to remember how many of the drain sections in which a node is
were recursive (i.e. subtree drain rather than node drain), so that they
can be correctly applied when children are added or removed during the
drained section.

With this change, it is safe to modify the graph even inside a
bdrv_subtree_drained_begin/end() section.

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