[PATCH 3/6] qemu: vcpupin: Don't overwrite errors from functions setting pinning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both errors from the cgroups code and from the affinity code would be
overwritten by the API. Report the more specific error.
---
 src/qemu/qemu_driver.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a762521..24c1ca4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -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);
-- 
2.6.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]