]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: Inactivate all children
authorFam Zheng <famz@redhat.com>
Wed, 11 May 2016 02:45:35 +0000 (10:45 +0800)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 May 2016 13:22:09 +0000 (15:22 +0200)
commitaad0b7a0bfbd6d200f617396c0d3b71ac7abfa40
tree94285bdbdf58bbf65b008041f57972b3c2988112
parentc9e9e9c66cee9932fb28a41a4659aa421a7a3f78
block: Inactivate all children

Currently we only inactivate the top BDS. Actually bdrv_inactivate
should be the opposite of bdrv_invalidate_cache.

Recurse into the whole subtree instead.

Because a node may have multiple parents, and because once
BDRV_O_INACTIVE is set for a node, further writes are not allowed, we
cannot interleave flag settings and .bdrv_inactivate calls (that may
submit write to other nodes in a graph) within a single pass. Therefore
two passes are used here.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c