mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuDomainDiskChainElement{Prepare,Revoke}: manage /dev entry
Again, one missed bit. This time without this commit there is no /dev entry in the namespace of the qemu process when doing disk snapshots or block-copy. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
18ce9d139d
commit
786d8d91b4
@ -5090,13 +5090,16 @@ qemuDomainDiskChainElementRevoke(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virStorageSourcePtr elem)
|
||||
{
|
||||
if (qemuTeardownImageCgroup(vm, elem) < 0)
|
||||
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
||||
NULLSTR(elem->path));
|
||||
|
||||
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
||||
vm->def, elem) < 0)
|
||||
VIR_WARN("Unable to restore security label on %s", NULLSTR(elem->path));
|
||||
|
||||
if (qemuTeardownImageCgroup(vm, elem) < 0)
|
||||
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
||||
NULLSTR(elem->path));
|
||||
if (qemuDomainNamespaceTeardownDisk(driver, vm, elem) < 0)
|
||||
VIR_WARN("Unable to remove /dev entry for %s", NULLSTR(elem->path));
|
||||
|
||||
if (virDomainLockImageDetach(driver->lockManager, vm, elem) < 0)
|
||||
VIR_WARN("Unable to release lock on %s", NULLSTR(elem->path));
|
||||
@ -5126,6 +5129,9 @@ qemuDomainDiskChainElementPrepare(virQEMUDriverPtr driver,
|
||||
if (virDomainLockImageAttach(driver->lockManager, cfg->uri, vm, elem) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainNamespaceSetupDisk(driver, vm, elem) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuSetupImageCgroup(vm, elem) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user