mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: put data-file path to VM's cgroup and namespace
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
702f8b5a77
commit
9ba2bef816
@ -232,7 +232,14 @@ int
|
|||||||
qemuSetupImageCgroup(virDomainObj *vm,
|
qemuSetupImageCgroup(virDomainObj *vm,
|
||||||
virStorageSource *src)
|
virStorageSource *src)
|
||||||
{
|
{
|
||||||
return qemuSetupImageCgroupInternal(vm, src, false);
|
if (qemuSetupImageCgroupInternal(vm, src, false) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (src->dataFileStore &&
|
||||||
|
qemuSetupImageCgroupInternal(vm, src->dataFileStore, false) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -321,6 +328,10 @@ qemuSetupImageChainCgroup(virDomainObj *vm,
|
|||||||
if (qemuSetupImageCgroupInternal(vm, next, forceReadonly) < 0)
|
if (qemuSetupImageCgroupInternal(vm, next, forceReadonly) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (next->dataFileStore &&
|
||||||
|
qemuSetupImageCgroupInternal(vm, next->dataFileStore, forceReadonly) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
/* setup only the top level image for read-write */
|
/* setup only the top level image for read-write */
|
||||||
forceReadonly = true;
|
forceReadonly = true;
|
||||||
}
|
}
|
||||||
|
@ -272,6 +272,10 @@ qemuDomainSetupDisk(virStorageSource *src,
|
|||||||
} else {
|
} else {
|
||||||
GSList *targetPaths = NULL;
|
GSList *targetPaths = NULL;
|
||||||
|
|
||||||
|
if (next->dataFileStore &&
|
||||||
|
virStorageSourceIsLocalStorage(next->dataFileStore))
|
||||||
|
*paths = g_slist_prepend(*paths, g_strdup(next->dataFileStore->path));
|
||||||
|
|
||||||
if (virStorageSourceIsEmpty(next) ||
|
if (virStorageSourceIsEmpty(next) ||
|
||||||
!virStorageSourceIsLocalStorage(next)) {
|
!virStorageSourceIsLocalStorage(next)) {
|
||||||
/* Not creating device. Just continue. */
|
/* Not creating device. Just continue. */
|
||||||
|
Loading…
Reference in New Issue
Block a user