]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Revoke access to mirror on failed blockcopy
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 14 Apr 2020 09:18:02 +0000 (11:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Apr 2020 14:12:41 +0000 (16:12 +0200)
commit67e19fc99a9405392d442b0d87627d9936c80dc1
tree139151853fba11ce27a1d9a0f38e51cccbaae368
parent8fb7c0c506df360ecdc165c67bee48514dbac7e9
qemu: Revoke access to mirror on failed blockcopy

When preparing to do a blockcopy, the mirror image is modified so
that QEMU can access it. For instance, the mirror has seclabels
set, if it is a NVMe disk it is detached from the host and so on.
And usually, the restore is done upon successful finish of the
blockcopy operation. But, if something fails then we need to
explicitly revoke the access to the mirror image (and thus
reattach NVMe disk back to the host).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1822538
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Mores <pmores@redhat.com>
src/qemu/qemu_driver.c