mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: vcpupin: Don't overwrite errors from functions setting pinning
Both errors from the cgroups code and from the affinity code would be overwritten by the API. Report the more specific error.
This commit is contained in:
parent
9268b9ad48
commit
471741309d
@ -5066,20 +5066,12 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
|
||||
if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_VCPU, vcpu,
|
||||
false, &cgroup_vcpu) < 0)
|
||||
goto endjob;
|
||||
if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
_("failed to set cpuset.cpus in cgroup"
|
||||
" for vcpu %d"), vcpu);
|
||||
if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0)
|
||||
goto endjob;
|
||||
}
|
||||
} else {
|
||||
if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu),
|
||||
pcpumap) < 0) {
|
||||
virReportError(VIR_ERR_SYSTEM_ERROR,
|
||||
_("failed to set cpu affinity for vcpu %d"),
|
||||
vcpu);
|
||||
pcpumap) < 0)
|
||||
goto endjob;
|
||||
}
|
||||
}
|
||||
|
||||
virBitmapFree(vcpuinfolive->cpumask);
|
||||
|
Loading…
x
Reference in New Issue
Block a user