From 1de6b45fb5c1489b450df7d1a4c692bba9678ce6 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 6 Mar 2020 15:14:13 +0100 Subject: block: bdrv_reopen() with backing file in different AioContext This patch allows bdrv_reopen() (and therefore the x-blockdev-reopen QMP command) to attach a node as the new backing file even if the node is in a different AioContext than the parent if one of both nodes can be moved to the AioContext of the other node. Signed-off-by: Kevin Wolf Tested-by: Peter Krempa Message-Id: <20200306141413.30705-3-kwolf@redhat.com> Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- tests/qemu-iotests/245 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 7d9eb62..1001275 100755 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -1015,18 +1015,16 @@ class TestBlockdevReopen(iotests.QMPTestCase): # neither of them can switch to the other AioContext def test_iothreads_error(self): self.run_test_iothreads('iothread0', 'iothread1', - "Cannot use a new backing file with a different AioContext") + "Cannot change iothread of active block backend") def test_iothreads_compatible_users(self): self.run_test_iothreads('iothread0', 'iothread0') def test_iothreads_switch_backing(self): - self.run_test_iothreads('iothread0', None, - "Cannot use a new backing file with a different AioContext") + self.run_test_iothreads('iothread0', None) def test_iothreads_switch_overlay(self): - self.run_test_iothreads(None, 'iothread0', - "Cannot use a new backing file with a different AioContext") + self.run_test_iothreads(None, 'iothread0') if __name__ == '__main__': iotests.main(supported_fmts=["qcow2"], -- cgit v1.1