]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Keep nodes drained between reopen_queue/multiple
authorKevin Wolf <kwolf@redhat.com>
Wed, 6 Dec 2017 19:24:44 +0000 (20:24 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Dec 2017 14:05:32 +0000 (15:05 +0100)
commit1a63a907507fbbcfaee3f622907ec244b7eabda8
tree3d99d71c98b48bbdc326b03fe6d154980a2ce0ce
parent44487eb973f895d68989cf931e25f309ec9807f9
block: Keep nodes drained between reopen_queue/multiple

The bdrv_reopen*() implementation doesn't like it if the graph is
changed between queuing nodes for reopen and actually reopening them
(one of the reasons is that queuing can be recursive).

So instead of draining the device only in bdrv_reopen_multiple(),
require that callers already drained all affected nodes, and assert this
in bdrv_reopen_queue().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
block.c
block/replication.c
qemu-io-cmds.c