mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-25 13:50:09 +03: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:
@ -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);
|
||||
|
Reference in New Issue
Block a user