From: Peter Krempa <pkre...@redhat.com> The block copy operation is supposed to just move the disk to a new destination. While in certain scenarios it'd make sense to drop the copy-on-read layer, the definition would not correspond to it.
This was caused by a fix to the behaviour of the block job after conversion to -blockdev as 'blockdev-mirror' requires the top node of the disk to be selected. This also causes that the 'copy-on-read' filter is ejected but libvirt doesn't unplug it. Instead we need to use the 'replaces' argument of 'blockdev-mirror' which allows to keep filters in place. This will preserve the configuration (which can be optimized later) and also fixes a spurious error logged when trying to unplug the first real file node after copy-on-read which still looks used to qemu. This is also needed for the upcoming feature which adds 'throttle' filter layers as we need to keep those in place too to facilitate the throttling. Resolves: https://issues.redhat.com/browse/RHEL-40077 Fixes: e3137539a9c4af25ab085506d5467ec0847b0ecc Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 84564b0658..cf7069a34a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14363,7 +14363,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, ret = qemuMonitorBlockdevMirror(priv->mon, job->name, true, qemuDomainDiskGetTopNodename(disk), qemuBlockStorageSourceGetEffectiveNodename(mirror), - NULL, + qemuBlockStorageSourceGetEffectiveNodename(disk->src), bandwidth, granularity, buf_size, mirror_shallow, syncWrites); -- 2.48.1