---
src/qemu/qemu_cgroup.c | 69 +++++++++++++++++++++++++++-----------------------
1 file changed, 38 insertions(+), 31 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 0ccbff9..1a24fb3 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -76,8 +76,9 @@ qemuSetupDiskPathAllow(virDomainDiskDefPtr disk,
}
-int qemuSetupDiskCgroup(virDomainObjPtr vm,
- virDomainDiskDefPtr disk)
+int
+qemuSetupDiskCgroup(virDomainObjPtr vm,
+ virDomainDiskDefPtr disk)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -85,10 +86,7 @@ int qemuSetupDiskCgroup(virDomainObjPtr vm,
VIR_CGROUP_CONTROLLER_DEVICES))
return 0;
- return virDomainDiskDefForeachPath(disk,
- true,
- qemuSetupDiskPathAllow,
- vm);
+ return virDomainDiskDefForeachPath(disk, true, qemuSetupDiskPathAllow, vm);
}
@@ -120,8 +118,9 @@ qemuTeardownDiskPathDeny(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED,
}
-int qemuTeardownDiskCgroup(virDomainObjPtr vm,
- virDomainDiskDefPtr disk)
+int
+qemuTeardownDiskCgroup(virDomainObjPtr vm,
+ virDomainDiskDefPtr disk)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -671,9 +670,7 @@ qemuSetupCpusetCgroup(virDomainObjPtr vm,
goto cleanup;
}
- rc = virCgroupSetCpusetCpus(priv->cgroup, cpu_mask);
-
- if (rc != 0) {
+ if ((rc = virCgroupSetCpusetCpus(priv->cgroup, cpu_mask)) != 0) {
virReportSystemError(-rc,
_("Unable to set cpuset.cpus for domain %s"),
vm->def->name);
@@ -719,9 +716,10 @@ qemuSetupCpuCgroup(virDomainObjPtr vm)
}
-int qemuInitCgroup(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- bool startup)
+int
+qemuInitCgroup(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ bool startup)
{
int rc = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -826,9 +824,10 @@ cleanup:
}
-int qemuSetupCgroup(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- virBitmapPtr nodemask)
+int
+qemuSetupCgroup(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virBitmapPtr nodemask)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virCapsPtr caps = NULL;
@@ -864,8 +863,10 @@ cleanup:
return ret;
}
-int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup, unsigned long long period,
- long long quota)
+int
+qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
+ unsigned long long period,
+ long long quota)
{
int rc;
unsigned long long old_period;
@@ -912,10 +913,11 @@ cleanup:
return -1;
}
-int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
- virDomainVcpuPinDefPtr *vcpupin,
- int nvcpupin,
- int vcpuid)
+int
+qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
+ virDomainVcpuPinDefPtr *vcpupin,
+ int nvcpupin,
+ int vcpuid)
{
size_t i;
@@ -928,8 +930,9 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
return -1;
}
-int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup,
- virBitmapPtr cpumask)
+int
+qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup,
+ virBitmapPtr cpumask)
{
int rc = 0;
char *new_cpus = NULL;
@@ -955,7 +958,8 @@ cleanup:
return rc;
}
-int qemuSetupCgroupForVcpu(virDomainObjPtr vm)
+int
+qemuSetupCgroupForVcpu(virDomainObjPtr vm)
{
virCgroupPtr cgroup_vcpu = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -1043,9 +1047,10 @@ cleanup:
return -1;
}
-int qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- virBitmapPtr nodemask)
+int
+qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virBitmapPtr nodemask)
{
virBitmapPtr cpumask = NULL;
virBitmapPtr cpumap = NULL;
@@ -1125,7 +1130,8 @@ cleanup:
return rc;
}
-int qemuRemoveCgroup(virDomainObjPtr vm)
+int
+qemuRemoveCgroup(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -1135,7 +1141,8 @@ int qemuRemoveCgroup(virDomainObjPtr vm)
return virCgroupRemove(priv->cgroup);
}
-int qemuAddToCgroup(virDomainObjPtr vm)
+int
+qemuAddToCgroup(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
int rc;
--
1.8.3.2