mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu_extdevice: Add a comment into qemuExtDevicesSetupCgroup()
The way setting up CGroups for external helpers work, is: qemuExtDevicesHasDevice() is called first to determine whether there is a helper process running, the CGroup controller is created and then qemuExtDevicesSetupCgroup() is called to place helpers into the CGroup. But when one reads just qemuExtDevicesSetupCgroup() it's easy to miss this hidden logic. Therefore, add a warning at the beginning of the function. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
598a73335d
commit
15e5eb8a76
@ -331,6 +331,9 @@ qemuExtDevicesSetupCgroup(virQEMUDriver *driver,
|
||||
virDomainDef *def = vm->def;
|
||||
size_t i;
|
||||
|
||||
/* Don't forget to adjust qemuExtDevicesHasDevice() accordingly.
|
||||
* Otherwise, this function might not be called at all. */
|
||||
|
||||
if (qemuDBusSetupCgroup(driver, vm, cgroup) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user