]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Revert "cputune: Support cputune for xend driver"
authorPeter Krempa <pkrempa@redhat.com>
Thu, 28 May 2015 12:40:30 +0000 (14:40 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Jun 2015 08:52:31 +0000 (10:52 +0200)
This reverts commit 01692bb167f7ab81213921ba1116d46a4651ef0e.

Quoting the original commit message:

"Not sure if it's the correct way to add cputune xml for xend driver..."

It is not. The defition created that is converted from the internal xend
structures would also be leaked since it isn't used any more.

Revert the commit since it does not make sense to keep the info
internally.

src/xen/xend_internal.c

index 99dfdcbf7b7bb4bf4af8d2c0039f9e1bdca17e1a..b81c0b7436443ff7a316fb0768254aceec0b0192 100644 (file)
@@ -1853,9 +1853,7 @@ xenDaemonDomainPinVcpu(virConnectPtr conn,
 {
     char buf[VIR_UUID_BUFLEN], mapstr[sizeof(cpumap_t) * 64];
     size_t i, j;
-    int ret;
     xenUnifiedPrivatePtr priv = conn->privateData;
-    virDomainDefPtr def = NULL;
 
     if (maplen > (int)sizeof(cpumap_t)) {
         virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__);
@@ -1882,37 +1880,9 @@ xenDaemonDomainPinVcpu(virConnectPtr conn,
 
     snprintf(buf, sizeof(buf), "%d", vcpu);
 
-    ret = xend_op(conn, minidef->name, "op", "pincpu", "vcpu", buf,
-                  "cpumap", mapstr, NULL);
+    return xend_op(conn, minidef->name, "op", "pincpu", "vcpu", buf,
+                   "cpumap", mapstr, NULL);
 
-    if (!(def = xenDaemonDomainFetch(conn,
-                                     minidef->id,
-                                     minidef->name,
-                                     NULL)))
-        goto cleanup;
-
-    if (ret == 0) {
-        if (!def->cputune.vcpupin) {
-            if (VIR_ALLOC(def->cputune.vcpupin) < 0)
-                goto cleanup;
-            def->cputune.nvcpupin = 0;
-        }
-        if (virDomainPinAdd(&def->cputune.vcpupin,
-                            &def->cputune.nvcpupin,
-                            cpumap,
-                            maplen,
-                            vcpu) < 0) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           "%s", _("failed to add vcpupin xml entry"));
-            return -1;
-        }
-    }
-
-    return ret;
-
- cleanup:
-    virDomainDefFree(def);
-    return -1;
 }
 
 /**