]> xenbits.xensource.com Git - libvirt.git/commit
qemu: hotplug: Fix detach of disk with managed persistent reservations
authorPeter Krempa <pkrempa@redhat.com>
Thu, 31 May 2018 13:18:20 +0000 (15:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 31 May 2018 14:41:40 +0000 (16:41 +0200)
commit105bcdde76bc8c64f2d9aca9db684186a5e96e63
tree0e1385cb10520e91994fb62ba950d239da76da74
parent5276ec712a44b3680569a096e8fe56a925f0d495
qemu: hotplug: Fix detach of disk with managed persistent reservations

In commit 8bebb2b735d I've refactored how the detach of disk with a
managed persistent reservations object is handled. After the commit if
any disk with a managed PR object would be removed libvirt would also
attempt to remove the shared 'pr-manager-helper' object potentially used
by other disks.

Thankfully this should not have practical impact as qemu should reject
deletion of the object if it was still used and the rest of the code is
correct.

Fix this by removing the disk from the definition earlier and checking
if the shared/managed pr-manager-helper object is still needed.

This basically splits the detach code for the managed PR object from the
unmanaged ones. The same separation will follow for the attachment code
as well as it greatly simplifies -blockdev support for this.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_hotplug.c