]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Replace virDomainIOThreadsPinAdd with virDomainPinAdd
authorJohn Ferlan <jferlan@redhat.com>
Wed, 11 Mar 2015 20:22:33 +0000 (16:22 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 16 Mar 2015 15:54:57 +0000 (11:54 -0400)
This one is no longer necessary since the Vcpu and IOThreads API's share

src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_driver.c

index 097796b84b10e4110448614fed80c5ca7c29bb64..a4026ca7bdf08231f69c54c73697c5cd6fc522c6 100644 (file)
@@ -16875,51 +16875,6 @@ virDomainEmulatorPinDel(virDomainDefPtr def)
     return 0;
 }
 
-int
-virDomainIOThreadsPinAdd(virDomainPinDefPtr **iothreadspin_list,
-                         size_t *niothreadspin,
-                         unsigned char *cpumap,
-                         int maplen,
-                         unsigned int iothread_id)
-{
-    virDomainPinDefPtr iothreadpin = NULL;
-
-    if (!iothreadspin_list)
-        return -1;
-
-    iothreadpin = virDomainPinFind(*iothreadspin_list,
-                                   *niothreadspin,
-                                   iothread_id);
-    if (iothreadpin) {
-        iothreadpin->id = iothread_id;
-        virBitmapFree(iothreadpin->cpumask);
-        iothreadpin->cpumask = virBitmapNewData(cpumap, maplen);
-        if (!iothreadpin->cpumask)
-            return -1;
-
-        return 0;
-    }
-
-    /* No existing iothreadpin matches iothread_id, adding a new one */
-
-    if (VIR_ALLOC(iothreadpin) < 0)
-        goto error;
-
-    iothreadpin->id = iothread_id;
-    iothreadpin->cpumask = virBitmapNewData(cpumap, maplen);
-    if (!iothreadpin->cpumask)
-        goto error;
-
-    if (VIR_APPEND_ELEMENT(*iothreadspin_list, *niothreadspin, iothreadpin) < 0)
-        goto error;
-
-    return 0;
-
- error:
-    virDomainPinDefFree(iothreadpin);
-    return -1;
-}
-
 void
 virDomainIOThreadsPinDel(virDomainDefPtr def,
                          unsigned int iothread_id)
index 8f5610a49c4538e7d287c4f4e8728d9a3e88bb70..49d83a226f8583345d21e132eb62d1f0edd08084 100644 (file)
@@ -2571,12 +2571,6 @@ int virDomainEmulatorPinAdd(virDomainDefPtr def,
 
 int virDomainEmulatorPinDel(virDomainDefPtr def);
 
-int virDomainIOThreadsPinAdd(virDomainPinDefPtr **iothreadspin_list,
-                             size_t *niothreads,
-                             unsigned char *cpumap,
-                             int maplen,
-                             unsigned int iothread_id);
-
 void virDomainIOThreadsPinDel(virDomainDefPtr def,
                               unsigned int iothread_id);
 
index 0b50a4e0b3dba9f8d6e52594ce6e2244a5c944da..9fe766ad6b68585977b531c91bbacfe734f6e5d7 100644 (file)
@@ -312,7 +312,6 @@ virDomainHubTypeToString;
 virDomainHypervTypeFromString;
 virDomainHypervTypeToString;
 virDomainInputDefFree;
-virDomainIOThreadsPinAdd;
 virDomainIOThreadsPinDel;
 virDomainLeaseDefFree;
 virDomainLeaseIndex;
index 5ec07f41b7d68e2c6408fbef41b893917468d9b1..5c8d75b3d142e197caa61fc467692aa0f0b5bd97 100644 (file)
@@ -5997,8 +5997,8 @@ qemuDomainPinIOThread(virDomainPtr dom,
             newIOThreadsPinNum = 0;
         }
 
-        if (virDomainIOThreadsPinAdd(&newIOThreadsPin, &newIOThreadsPinNum,
-                                     cpumap, maplen, iothread_id) < 0) {
+        if (virDomainPinAdd(&newIOThreadsPin, &newIOThreadsPinNum,
+                            cpumap, maplen, iothread_id) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("failed to update iothreadspin"));
             goto endjob;
@@ -6069,11 +6069,11 @@ qemuDomainPinIOThread(virDomainPtr dom,
                 goto endjob;
             persistentDef->cputune.niothreadspin = 0;
         }
-        if (virDomainIOThreadsPinAdd(&persistentDef->cputune.iothreadspin,
-                                     &persistentDef->cputune.niothreadspin,
-                                     cpumap,
-                                     maplen,
-                                     iothread_id) < 0) {
+        if (virDomainPinAdd(&persistentDef->cputune.iothreadspin,
+                            &persistentDef->cputune.niothreadspin,
+                            cpumap,
+                            maplen,
+                            iothread_id) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("failed to update or add iothreadspin xml "
                              "of a persistent domain"));