iotests: Test mirror with temporarily disabled target backing file
commit8bdee9f10eac2aefdcc5095feef756354c87bdec
authorKevin Wolf <kwolf@redhat.com>
Tue, 10 Mar 2020 11:38:28 +0000 (10 12:38 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 11 Mar 2020 14:54:38 +0000 (11 15:54 +0100)
tree68da89476158adbcef76a4c7741323adb5699ef3
parentb31b532122ec6f68d17168449c034d2197bf96ec
iotests: Test mirror with temporarily disabled target backing file

The newly tested scenario is a common live storage migration scenario:
The target node is opened without a backing file so that the active
layer is mirrored while its backing chain can be copied in the
background.

The backing chain should be attached to the mirror target node when
finalising the job, just before switching the users of the source node
to the new copy (at which point the mirror job still has a reference to
the node). drive-mirror did this automatically, but with blockdev-mirror
this is the job of the QMP client.

This patch adds test cases for two ways to achieve the desired result,
using either x-blockdev-reopen or blockdev-snapshot.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200310113831.27293-5-kwolf@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/155
tests/qemu-iotests/155.out