mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 11:52:20 +00:00
qemuProcessStop: Reattach NVMe disks a domain is mirroring into
If the mirror destination is not a file but a NVMe disk, then call qemuHostdevReAttachOneNVMeDisk() to reattach the NVMe back to the host. This would be done by blockjob code when the job finishes, but in this case the job won't finish - QEMU is killed meanwhile. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1825785 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
0230e38384
commit
8fd2749b2d
@ -7600,6 +7600,9 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
if (disk->mirror) {
|
||||
if (qemuSecurityRestoreImageLabel(driver, vm, disk->mirror, false) < 0)
|
||||
VIR_WARN("Unable to restore security label on %s", disk->dst);
|
||||
|
||||
if (virStorageSourceChainHasNVMe(disk->mirror))
|
||||
qemuHostdevReAttachOneNVMeDisk(driver, vm->def->name, disk->mirror);
|
||||
}
|
||||
|
||||
qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src);
|
||||
|
Loading…
x
Reference in New Issue
Block a user