[PATCH 04/17] nodeinfo: rename all memory APIs to have a virHostMem prefix

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

 



In preparation for moving all the memory related APIs out of
the nodeinfo file, give them a virHostMem name prefix.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/libvirt_private.syms   | 14 ++++----
 src/lxc/lxc_driver.c       | 16 ++++-----
 src/nodeinfo.c             | 82 +++++++++++++++++++++++-----------------------
 src/nodeinfo.h             | 35 ++++++++++----------
 src/openvz/openvz_driver.c |  6 ++--
 src/qemu/qemu_driver.c     | 16 ++++-----
 src/uml/uml_driver.c       | 16 ++++-----
 src/util/virnuma.c         |  2 +-
 src/vbox/vbox_common.c     | 10 +++---
 src/xen/xen_driver.c       |  4 +--
 10 files changed, 101 insertions(+), 100 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a9025f5..2317c25 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1025,21 +1025,21 @@ virLogManagerNew;
 
 
 # nodeinfo.h
-nodeAllocPages;
 nodeCapsInitNUMA;
-nodeGetCellsFreeMemory;
 nodeGetCPUCount;
 nodeGetCPUMap;
 nodeGetCPUStats;
-nodeGetFreePages;
 nodeGetInfo;
-nodeGetMemory;
-nodeGetMemoryParameters;
-nodeGetMemoryStats;
 nodeGetOnlineCPUBitmap;
 nodeGetPresentCPUBitmap;
 nodeGetThreadsPerSubcore;
-nodeSetMemoryParameters;
+virHostMemAllocPages;
+virHostMemGetCellsFree;
+virHostMemGetFreePages;
+virHostMemGetInfo;
+virHostMemGetParameters;
+virHostMemGetStats;
+virHostMemSetParameters;
 
 
 # secret/secret_util.h
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e7f66cc..3a8383b 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -5454,7 +5454,7 @@ lxcNodeGetMemoryStats(virConnectPtr conn,
     if (virNodeGetMemoryStatsEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryStats(cellNum, params, nparams, flags);
+    return virHostMemGetStats(cellNum, params, nparams, flags);
 }
 
 
@@ -5467,7 +5467,7 @@ lxcNodeGetCellsFreeMemory(virConnectPtr conn,
     if (virNodeGetCellsFreeMemoryEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
+    return virHostMemGetCellsFree(freeMems, startCell, maxCells);
 }
 
 
@@ -5479,7 +5479,7 @@ lxcNodeGetFreeMemory(virConnectPtr conn)
     if (virNodeGetFreeMemoryEnsureACL(conn) < 0)
         return 0;
 
-    if (nodeGetMemory(NULL, &freeMem) < 0)
+    if (virHostMemGetInfo(NULL, &freeMem) < 0)
         return 0;
 
     return freeMem;
@@ -5495,7 +5495,7 @@ lxcNodeGetMemoryParameters(virConnectPtr conn,
     if (virNodeGetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryParameters(params, nparams, flags);
+    return virHostMemGetParameters(params, nparams, flags);
 }
 
 
@@ -5508,7 +5508,7 @@ lxcNodeSetMemoryParameters(virConnectPtr conn,
     if (virNodeSetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeSetMemoryParameters(params, nparams, flags);
+    return virHostMemSetParameters(params, nparams, flags);
 }
 
 
@@ -5667,7 +5667,7 @@ lxcNodeGetFreePages(virConnectPtr conn,
     if (virNodeGetFreePagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetFreePages(npages, pages, startCell, cellCount, counts);
+    return virHostMemGetFreePages(npages, pages, startCell, cellCount, counts);
 }
 
 
@@ -5687,8 +5687,8 @@ lxcNodeAllocPages(virConnectPtr conn,
     if (virNodeAllocPagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeAllocPages(npages, pageSizes, pageCounts,
-                          startCell, cellCount, add);
+    return virHostMemAllocPages(npages, pageSizes, pageCounts,
+                                startCell, cellCount, add);
 }
 
 
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index e6a9d3d..1cac1a4 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -187,7 +187,7 @@ freebsdNodeGetCPUStats(int cpuNum,
 }
 
 static int
-freebsdNodeGetMemoryStats(virNodeMemoryStatsPtr params,
+virHostMemGetStatsFreeBSD(virNodeMemoryStatsPtr params,
                           int *nparams)
 {
     size_t i, j = 0;
@@ -960,7 +960,7 @@ linuxNodeGetCPUStats(FILE *procstat,
 }
 
 static int
-linuxNodeGetMemoryStats(FILE *meminfo,
+virHostMemGetStatsLinux(FILE *meminfo,
                         int cellNum,
                         virNodeMemoryStatsPtr params,
                         int *nparams)
@@ -1247,7 +1247,7 @@ nodeGetInfo(virNodeInfoPtr nodeinfo)
     if (virStrcpyStatic(nodeinfo->model, virArchToString(hostarch)) == NULL)
         return -1;
 
-    if (nodeGetMemory(&memorybytes, NULL) < 0)
+    if (virHostMemGetInfo(&memorybytes, NULL) < 0)
         return -1;
     nodeinfo->memory = memorybytes / 1024;
 
@@ -1292,7 +1292,7 @@ nodeGetCPUStats(int cpuNum ATTRIBUTE_UNUSED,
 }
 
 int
-nodeGetMemoryStats(int cellNum ATTRIBUTE_UNUSED,
+virHostMemGetStats(int cellNum ATTRIBUTE_UNUSED,
                    virNodeMemoryStatsPtr params ATTRIBUTE_UNUSED,
                    int *nparams ATTRIBUTE_UNUSED,
                    unsigned int flags)
@@ -1333,14 +1333,14 @@ nodeGetMemoryStats(int cellNum ATTRIBUTE_UNUSED,
             VIR_FREE(meminfo_path);
             return -1;
         }
-        ret = linuxNodeGetMemoryStats(meminfo, cellNum, params, nparams);
+        ret = virHostMemGetStatsLinux(meminfo, cellNum, params, nparams);
         VIR_FORCE_FCLOSE(meminfo);
         VIR_FREE(meminfo_path);
 
         return ret;
     }
 #elif defined(__FreeBSD__)
-    return freebsdNodeGetMemoryStats(params, nparams);
+    return virHostMemGetStatsFreeBSD(params, nparams);
 #else
     virReportError(VIR_ERR_NO_SUPPORT, "%s",
                    _("node memory stats not implemented on this platform"));
@@ -1491,7 +1491,7 @@ nodeGetOnlineCPUBitmap(void)
 
 #ifdef __linux__
 static int
-nodeSetMemoryParameterValue(virTypedParameterPtr param)
+virHostMemSetParameterValue(virTypedParameterPtr param)
 {
     char *path = NULL;
     char *strval = NULL;
@@ -1525,8 +1525,8 @@ nodeSetMemoryParameterValue(virTypedParameterPtr param)
 }
 
 static bool
-nodeMemoryParametersIsAllSupported(virTypedParameterPtr params,
-                                   int nparams)
+virHostMemParametersAreAllSupported(virTypedParameterPtr params,
+                                    int nparams)
 {
     char *path = NULL;
     size_t i;
@@ -1557,7 +1557,7 @@ nodeMemoryParametersIsAllSupported(virTypedParameterPtr params,
 #endif
 
 int
-nodeSetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
+virHostMemSetParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
                         int nparams ATTRIBUTE_UNUSED,
                         unsigned int flags)
 {
@@ -1577,11 +1577,11 @@ nodeSetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
                                NULL) < 0)
         return -1;
 
-    if (!nodeMemoryParametersIsAllSupported(params, nparams))
+    if (!virHostMemParametersAreAllSupported(params, nparams))
         return -1;
 
     for (i = 0; i < nparams; i++) {
-        rc = nodeSetMemoryParameterValue(&params[i]);
+        rc = virHostMemSetParameterValue(&params[i]);
 
         if (rc < 0)
             return -1;
@@ -1598,7 +1598,7 @@ nodeSetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
 
 #ifdef __linux__
 static int
-nodeGetMemoryParameterValue(const char *field,
+virHostMemGetParameterValue(const char *field,
                             void *value)
 {
     char *path = NULL;
@@ -1649,7 +1649,7 @@ nodeGetMemoryParameterValue(const char *field,
 
 #define NODE_MEMORY_PARAMETERS_NUM 8
 int
-nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
+virHostMemGetParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
                         int *nparams ATTRIBUTE_UNUSED,
                         unsigned int flags)
 {
@@ -1677,7 +1677,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
 
         switch (i) {
         case 0:
-            ret = nodeGetMemoryParameterValue("pages_to_scan", &pages_to_scan);
+            ret = virHostMemGetParameterValue("pages_to_scan", &pages_to_scan);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1690,7 +1690,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 1:
-            ret = nodeGetMemoryParameterValue("sleep_millisecs", &sleep_millisecs);
+            ret = virHostMemGetParameterValue("sleep_millisecs", &sleep_millisecs);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1703,7 +1703,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 2:
-            ret = nodeGetMemoryParameterValue("pages_shared", &pages_shared);
+            ret = virHostMemGetParameterValue("pages_shared", &pages_shared);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1716,7 +1716,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 3:
-            ret = nodeGetMemoryParameterValue("pages_sharing", &pages_sharing);
+            ret = virHostMemGetParameterValue("pages_sharing", &pages_sharing);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1729,7 +1729,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 4:
-            ret = nodeGetMemoryParameterValue("pages_unshared", &pages_unshared);
+            ret = virHostMemGetParameterValue("pages_unshared", &pages_unshared);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1742,7 +1742,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 5:
-            ret = nodeGetMemoryParameterValue("pages_volatile", &pages_volatile);
+            ret = virHostMemGetParameterValue("pages_volatile", &pages_volatile);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1755,7 +1755,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 6:
-            ret = nodeGetMemoryParameterValue("full_scans", &full_scans);
+            ret = virHostMemGetParameterValue("full_scans", &full_scans);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1768,7 +1768,7 @@ nodeGetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
             break;
 
         case 7:
-            ret = nodeGetMemoryParameterValue("merge_across_nodes", &merge_across_nodes);
+            ret = virHostMemGetParameterValue("merge_across_nodes", &merge_across_nodes);
             if (ret == -2)
                 continue;
             else if (ret == -1)
@@ -1886,7 +1886,7 @@ nodeCapsInitNUMAFake(const char *cpupath ATTRIBUTE_UNUSED,
 }
 
 static int
-nodeGetCellsFreeMemoryFake(unsigned long long *freeMems,
+virHostMemGetCellsFreeFake(unsigned long long *freeMems,
                            int startCell,
                            int maxCells ATTRIBUTE_UNUSED)
 {
@@ -1911,8 +1911,8 @@ nodeGetCellsFreeMemoryFake(unsigned long long *freeMems,
 }
 
 static int
-nodeGetMemoryFake(unsigned long long *mem,
-                  unsigned long long *freeMem)
+virHostMemGetInfoFake(unsigned long long *mem,
+                      unsigned long long *freeMem)
 {
     int ret = -1;
 
@@ -2168,7 +2168,7 @@ nodeCapsInitNUMA(virCapsPtr caps)
 
 
 int
-nodeGetCellsFreeMemory(unsigned long long *freeMems,
+virHostMemGetCellsFree(unsigned long long *freeMems,
                        int startCell,
                        int maxCells)
 {
@@ -2178,7 +2178,7 @@ nodeGetCellsFreeMemory(unsigned long long *freeMems,
     int maxCell;
 
     if (!virNumaIsAvailable())
-        return nodeGetCellsFreeMemoryFake(freeMems,
+        return virHostMemGetCellsFreeFake(freeMems,
                                           startCell, maxCells);
 
     if ((maxCell = virNumaGetMaxNode()) < 0)
@@ -2206,8 +2206,8 @@ nodeGetCellsFreeMemory(unsigned long long *freeMems,
 }
 
 int
-nodeGetMemory(unsigned long long *mem,
-              unsigned long long *freeMem)
+virHostMemGetInfo(unsigned long long *mem,
+                  unsigned long long *freeMem)
 {
     int max_node;
     int n;
@@ -2219,7 +2219,7 @@ nodeGetMemory(unsigned long long *mem,
         *freeMem = 0;
 
     if (!virNumaIsAvailable())
-        return nodeGetMemoryFake(mem, freeMem);
+        return virHostMemGetInfoFake(mem, freeMem);
 
     if ((max_node = virNumaGetMaxNode()) < 0)
         return -1;
@@ -2244,11 +2244,11 @@ nodeGetMemory(unsigned long long *mem,
 }
 
 int
-nodeGetFreePages(unsigned int npages,
-                 unsigned int *pages,
-                 int startCell,
-                 unsigned int cellCount,
-                 unsigned long long *counts)
+virHostMemGetFreePages(unsigned int npages,
+                       unsigned int *pages,
+                       int startCell,
+                       unsigned int cellCount,
+                       unsigned long long *counts)
 {
     int ret = -1;
     int cell, lastCell;
@@ -2290,12 +2290,12 @@ nodeGetFreePages(unsigned int npages,
 }
 
 int
-nodeAllocPages(unsigned int npages,
-               unsigned int *pageSizes,
-               unsigned long long *pageCounts,
-               int startCell,
-               unsigned int cellCount,
-               bool add)
+virHostMemAllocPages(unsigned int npages,
+                     unsigned int *pageSizes,
+                     unsigned long long *pageCounts,
+                     int startCell,
+                     unsigned int cellCount,
+                     bool add)
 {
     int ret = -1;
     int cell, lastCell;
diff --git a/src/nodeinfo.h b/src/nodeinfo.h
index b4f434e..d89db33 100644
--- a/src/nodeinfo.h
+++ b/src/nodeinfo.h
@@ -33,26 +33,26 @@ int nodeGetCPUStats(int cpuNum,
                     virNodeCPUStatsPtr params,
                     int *nparams,
                     unsigned int flags);
-int nodeGetMemoryStats(int cellNum,
+int virHostMemGetStats(int cellNum,
                        virNodeMemoryStatsPtr params,
                        int *nparams,
                        unsigned int flags);
-int nodeGetCellsFreeMemory(unsigned long long *freeMems,
+int virHostMemGetCellsFree(unsigned long long *freeMems,
                            int startCell,
                            int maxCells);
-int nodeGetMemory(unsigned long long *mem,
-                  unsigned long long *freeMem);
+int virHostMemGetInfo(unsigned long long *mem,
+                      unsigned long long *freeMem);
 
 virBitmapPtr nodeGetPresentCPUBitmap(void);
 virBitmapPtr nodeGetOnlineCPUBitmap(void);
 int nodeGetCPUCount(void);
 int nodeGetThreadsPerSubcore(virArch arch);
 
-int nodeGetMemoryParameters(virTypedParameterPtr params,
+int virHostMemGetParameters(virTypedParameterPtr params,
                             int *nparams,
                             unsigned int flags);
 
-int nodeSetMemoryParameters(virTypedParameterPtr params,
+int virHostMemSetParameters(virTypedParameterPtr params,
                             int nparams,
                             unsigned int flags);
 
@@ -60,16 +60,17 @@ int nodeGetCPUMap(unsigned char **cpumap,
                   unsigned int *online,
                   unsigned int flags);
 
-int nodeGetFreePages(unsigned int npages,
-                     unsigned int *pages,
-                     int startCell,
-                     unsigned int cellCount,
-                     unsigned long long *counts);
+int virHostMemGetFreePages(unsigned int npages,
+                           unsigned int *pages,
+                           int startCell,
+                           unsigned int cellCount,
+                           unsigned long long *counts);
+
+int virHostMemAllocPages(unsigned int npages,
+                         unsigned int *pageSizes,
+                         unsigned long long *pageCounts,
+                         int startCell,
+                         unsigned int cellCount,
+                         bool add);
 
-int nodeAllocPages(unsigned int npages,
-                   unsigned int *pageSizes,
-                   unsigned long long *pageCounts,
-                   int startCell,
-                   unsigned int cellCount,
-                   bool add);
 #endif /* __VIR_NODEINFO_H__*/
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 24a20cc..a68c1e7 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -2177,7 +2177,7 @@ openvzNodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
                          int *nparams,
                          unsigned int flags)
 {
-    return nodeGetMemoryStats(cellNum, params, nparams, flags);
+    return virHostMemGetStats(cellNum, params, nparams, flags);
 }
 
 
@@ -2187,7 +2187,7 @@ openvzNodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
                              int startCell,
                              int maxCells)
 {
-    return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
+    return virHostMemGetCellsFree(freeMems, startCell, maxCells);
 }
 
 
@@ -2195,7 +2195,7 @@ static unsigned long long
 openvzNodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     unsigned long long freeMem;
-    if (nodeGetMemory(NULL, &freeMem) < 0)
+    if (virHostMemGetInfo(NULL, &freeMem) < 0)
         return 0;
     return freeMem;
 }
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 79447e9..b6d332c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18538,7 +18538,7 @@ qemuNodeGetMemoryStats(virConnectPtr conn,
     if (virNodeGetMemoryStatsEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryStats(cellNum, params, nparams, flags);
+    return virHostMemGetStats(cellNum, params, nparams, flags);
 }
 
 
@@ -18551,7 +18551,7 @@ qemuNodeGetCellsFreeMemory(virConnectPtr conn,
     if (virNodeGetCellsFreeMemoryEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
+    return virHostMemGetCellsFree(freeMems, startCell, maxCells);
 }
 
 
@@ -18563,7 +18563,7 @@ qemuNodeGetFreeMemory(virConnectPtr conn)
     if (virNodeGetFreeMemoryEnsureACL(conn) < 0)
         return 0;
 
-    if (nodeGetMemory(NULL, &freeMem) < 0)
+    if (virHostMemGetInfo(NULL, &freeMem) < 0)
         return 0;
 
     return freeMem;
@@ -18579,7 +18579,7 @@ qemuNodeGetMemoryParameters(virConnectPtr conn,
     if (virNodeGetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryParameters(params, nparams, flags);
+    return virHostMemGetParameters(params, nparams, flags);
 }
 
 
@@ -18592,7 +18592,7 @@ qemuNodeSetMemoryParameters(virConnectPtr conn,
     if (virNodeSetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeSetMemoryParameters(params, nparams, flags);
+    return virHostMemSetParameters(params, nparams, flags);
 }
 
 
@@ -18863,7 +18863,7 @@ qemuNodeGetFreePages(virConnectPtr conn,
     if (virNodeGetFreePagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetFreePages(npages, pages, startCell, cellCount, counts);
+    return virHostMemGetFreePages(npages, pages, startCell, cellCount, counts);
 }
 
 
@@ -19740,8 +19740,8 @@ qemuNodeAllocPages(virConnectPtr conn,
     if (virNodeAllocPagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeAllocPages(npages, pageSizes, pageCounts,
-                          startCell, cellCount, add);
+    return virHostMemAllocPages(npages, pageSizes, pageCounts,
+                                startCell, cellCount, add);
 }
 
 
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 1c7a36d..fd6811f 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2806,7 +2806,7 @@ umlNodeGetMemoryStats(virConnectPtr conn,
     if (virNodeGetMemoryStatsEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryStats(cellNum, params, nparams, flags);
+    return virHostMemGetStats(cellNum, params, nparams, flags);
 }
 
 
@@ -2819,7 +2819,7 @@ umlNodeGetCellsFreeMemory(virConnectPtr conn,
     if (virNodeGetCellsFreeMemoryEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
+    return virHostMemGetCellsFree(freeMems, startCell, maxCells);
 }
 
 
@@ -2831,7 +2831,7 @@ umlNodeGetFreeMemory(virConnectPtr conn)
     if (virNodeGetFreeMemoryEnsureACL(conn) < 0)
         return 0;
 
-    if (nodeGetMemory(NULL, &freeMem) < 0)
+    if (virHostMemGetInfo(NULL, &freeMem) < 0)
         return 0;
 
     return freeMem;
@@ -2847,7 +2847,7 @@ umlNodeGetMemoryParameters(virConnectPtr conn,
     if (virNodeGetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryParameters(params, nparams, flags);
+    return virHostMemGetParameters(params, nparams, flags);
 }
 
 
@@ -2860,7 +2860,7 @@ umlNodeSetMemoryParameters(virConnectPtr conn,
     if (virNodeSetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeSetMemoryParameters(params, nparams, flags);
+    return virHostMemSetParameters(params, nparams, flags);
 }
 
 
@@ -2904,7 +2904,7 @@ umlNodeGetFreePages(virConnectPtr conn,
     if (virNodeGetFreePagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetFreePages(npages, pages, startCell, cellCount, counts);
+    return virHostMemGetFreePages(npages, pages, startCell, cellCount, counts);
 }
 
 
@@ -2924,8 +2924,8 @@ umlNodeAllocPages(virConnectPtr conn,
     if (virNodeAllocPagesEnsureACL(conn) < 0)
         return -1;
 
-    return nodeAllocPages(npages, pageSizes, pageCounts,
-                          startCell, cellCount, add);
+    return virHostMemAllocPages(npages, pageSizes, pageCounts,
+                                startCell, cellCount, add);
 }
 
 
diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index df0f93a..1e78eb6 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -659,7 +659,7 @@ virNumaGetPageInfo(int node,
         /* TODO: come up with better algorithm that takes huge pages into
          * account. The problem is huge pages cut off regular memory. */
         if (node == -1) {
-            if (nodeGetMemory(&memsize, &memfree) < 0)
+            if (virHostMemGetInfo(&memsize, &memfree) < 0)
                 goto cleanup;
         } else {
             if (virNumaGetNodeMemory(node, &memsize, &memfree) < 0)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 02a7231..603a071 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -7531,14 +7531,14 @@ vboxNodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
                            int startCell,
                            int maxCells)
 {
-    return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
+    return virHostMemGetCellsFree(freeMems, startCell, maxCells);
 }
 
 static unsigned long long
 vboxNodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     unsigned long long freeMem;
-    if (nodeGetMemory(NULL, &freeMem) < 0)
+    if (virHostMemGetInfo(NULL, &freeMem) < 0)
         return 0;
     return freeMem;
 }
@@ -7554,7 +7554,7 @@ vboxNodeGetFreePages(virConnectPtr conn ATTRIBUTE_UNUSED,
 {
     virCheckFlags(0, -1);
 
-    return nodeGetFreePages(npages, pages, startCell, cellCount, counts);
+    return virHostMemGetFreePages(npages, pages, startCell, cellCount, counts);
 }
 
 static int
@@ -7570,8 +7570,8 @@ vboxNodeAllocPages(virConnectPtr conn ATTRIBUTE_UNUSED,
 
     virCheckFlags(VIR_NODE_ALLOC_PAGES_SET, -1);
 
-    return nodeAllocPages(npages, pageSizes, pageCounts,
-                          startCell, cellCount, add);
+    return virHostMemAllocPages(npages, pageSizes, pageCounts,
+                                startCell, cellCount, add);
 }
 
 static int
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 3f5d80d..2196666 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2563,7 +2563,7 @@ xenUnifiedNodeGetMemoryParameters(virConnectPtr conn,
     if (virNodeGetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeGetMemoryParameters(params, nparams, flags);
+    return virHostMemGetParameters(params, nparams, flags);
 }
 
 
@@ -2576,7 +2576,7 @@ xenUnifiedNodeSetMemoryParameters(virConnectPtr conn,
     if (virNodeSetMemoryParametersEnsureACL(conn) < 0)
         return -1;
 
-    return nodeSetMemoryParameters(params, nparams, flags);
+    return virHostMemSetParameters(params, nparams, flags);
 }
 
 
-- 
2.5.5

--
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]