]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Drain source node in bdrv_replace_node()
authorKevin Wolf <kwolf@redhat.com>
Tue, 21 May 2019 17:00:25 +0000 (19:00 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 17 Sep 2019 19:46:39 +0000 (14:46 -0500)
commit627fadfa1c44a298a04228179dd656de9aa6c9aa
tree539f2241c4efc1c6ba7420a2a73eb1ce05cab1ec
parent2429dc4eea91b381ff67a4d25ea9f6bbfe87c784
block: Drain source node in bdrv_replace_node()

Instead of just asserting that no requests are in flight in
bdrv_replace_node(), which is a requirement that most callers ignore, we
can just drain the source node right there. This fixes at least starting
a commit job while I/O is active on the backing chain, but probably
other callers, too.

Having requests in flight on the target node isn't a problem because the
target just gets new parents, but the call path of running requests
isn't modified. So we can just drop this assertion without a replacement.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1711643
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit f871abd60f4b67547e62c57c9bec19420052be39)
*prereq for d81e1efb tests
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block.c