]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuMigrationSrcNBDCopyCancel: Use qemuBlockStorageSourceAttachRollback to detach...
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Nov 2023 16:07:44 +0000 (17:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Nov 2023 09:14:20 +0000 (10:14 +0100)
commite534d19b5d0b5decf53733d7f3ff6d439f9a2a9d
treec04cc4337a48387a77fbba8b0ba6642d593e1431
parent9ec0e28e876b17df92247bce1328f2718cfd9239
qemuMigrationSrcNBDCopyCancel: Use qemuBlockStorageSourceAttachRollback to detach migration NBD blockdevs

Rewrite the code to use the common tooling for removing blockdevs
instead of the ad-hoc qemuBlockStorageSourceDetachOneBlockdev helper.

Use of the common infrastructure will properly handle cases when the raw
driver is ommited from the block graph.

Since the TLS data object is shared for all migration QMP commands and
objects we need to strip its alias from the definition of the storage
source before attempting to detach it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c