The new virCgroupSetupMemtune() virCgroupSetupCpusetCpus()
made the cgroup SetMemory and SetCpusetCpus functions to
be called only inside vircgroup.c.

Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com>
---
 src/libvirt_private.syms |  4 ----
 src/util/vircgroup.c     | 16 ++++++++--------
 src/util/vircgroup.h     |  4 ----
 3 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 3dc65916bf..1ec73a13c2 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1712,16 +1712,12 @@ virCgroupRemove;
 virCgroupSetAndRetrieveCpuShares;
 virCgroupSetCpuCfsPeriod;
 virCgroupSetCpuCfsQuota;
-virCgroupSetCpusetCpus;
 virCgroupSetCpusetMemoryMigrate;
 virCgroupSetCpusetMems;
 virCgroupSetCpuShares;
 virCgroupSetFreezerState;
 virCgroupSetMemory;
-virCgroupSetMemoryHardLimit;
 virCgroupSetMemoryLimitParameters;
-virCgroupSetMemorySoftLimit;
-virCgroupSetMemSwapHardLimit;
 virCgroupSetOwner;
 virCgroupSetupBlkioTune;
 virCgroupSetupCpuPeriodQuota;
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 8ee37cde7c..f0103d8062 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1653,7 +1653,7 @@ virCgroupGetMemoryUsage(virCgroupPtr group, unsigned long 
*kb)
  *
  * Returns: 0 on success
  */
-int
+static int
 virCgroupSetMemoryHardLimit(virCgroupPtr group, unsigned long long kb)
 {
     VIR_CGROUP_BACKEND_CALL(group, VIR_CGROUP_CONTROLLER_MEMORY,
@@ -1685,7 +1685,7 @@ virCgroupGetMemoryHardLimit(virCgroupPtr group, unsigned 
long long *kb)
  *
  * Returns: 0 on success
  */
-int
+static int
 virCgroupSetMemorySoftLimit(virCgroupPtr group, unsigned long long kb)
 {
     VIR_CGROUP_BACKEND_CALL(group, VIR_CGROUP_CONTROLLER_MEMORY,
@@ -1717,7 +1717,7 @@ virCgroupGetMemorySoftLimit(virCgroupPtr group, unsigned 
long long *kb)
  *
  * Returns: 0 on success
  */
-int
+static int
 virCgroupSetMemSwapHardLimit(virCgroupPtr group, unsigned long long kb)
 {
     VIR_CGROUP_BACKEND_CALL(group, VIR_CGROUP_CONTROLLER_MEMORY,
@@ -1829,7 +1829,7 @@ virCgroupGetCpusetMemoryMigrate(virCgroupPtr group, bool 
*migrate)
  *
  * Returns: 0 on success
  */
-int
+static int
 virCgroupSetCpusetCpus(virCgroupPtr group, const char *cpus)
 {
     VIR_CGROUP_BACKEND_CALL(group, VIR_CGROUP_CONTROLLER_CPUSET,
@@ -3129,7 +3129,7 @@ virCgroupGetMemoryUsage(virCgroupPtr group G_GNUC_UNUSED,
 }
 
 
-int
+static int
 virCgroupSetMemoryHardLimit(virCgroupPtr group G_GNUC_UNUSED,
                             unsigned long long kb G_GNUC_UNUSED)
 {
@@ -3149,7 +3149,7 @@ virCgroupGetMemoryHardLimit(virCgroupPtr group 
G_GNUC_UNUSED,
 }
 
 
-int
+static int
 virCgroupSetMemorySoftLimit(virCgroupPtr group G_GNUC_UNUSED,
                             unsigned long long kb G_GNUC_UNUSED)
 {
@@ -3169,7 +3169,7 @@ virCgroupGetMemorySoftLimit(virCgroupPtr group 
G_GNUC_UNUSED,
 }
 
 
-int
+static int
 virCgroupSetMemSwapHardLimit(virCgroupPtr group G_GNUC_UNUSED,
                              unsigned long long kb G_GNUC_UNUSED)
 {
@@ -3239,7 +3239,7 @@ virCgroupGetCpusetMemoryMigrate(virCgroupPtr group 
G_GNUC_UNUSED,
 }
 
 
-int
+static int
 virCgroupSetCpusetCpus(virCgroupPtr group G_GNUC_UNUSED,
                        const char *cpus G_GNUC_UNUSED)
 {
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 35a11e6b67..1607e951b1 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -145,11 +145,8 @@ int virCgroupGetMemoryStat(virCgroupPtr group,
                            unsigned long long *unevictable);
 int virCgroupGetMemoryUsage(virCgroupPtr group, unsigned long *kb);
 
-int virCgroupSetMemoryHardLimit(virCgroupPtr group, unsigned long long kb);
 int virCgroupGetMemoryHardLimit(virCgroupPtr group, unsigned long long *kb);
-int virCgroupSetMemorySoftLimit(virCgroupPtr group, unsigned long long kb);
 int virCgroupGetMemorySoftLimit(virCgroupPtr group, unsigned long long *kb);
-int virCgroupSetMemSwapHardLimit(virCgroupPtr group, unsigned long long kb);
 int virCgroupGetMemSwapHardLimit(virCgroupPtr group, unsigned long long *kb);
 int virCgroupGetMemSwapUsage(virCgroupPtr group, unsigned long long *kb);
 
@@ -223,7 +220,6 @@ int virCgroupGetCpusetMems(virCgroupPtr group, char **mems);
 int virCgroupSetCpusetMemoryMigrate(virCgroupPtr group, bool migrate);
 int virCgroupGetCpusetMemoryMigrate(virCgroupPtr group, bool *migrate);
 
-int virCgroupSetCpusetCpus(virCgroupPtr group, const char *cpus);
 int virCgroupGetCpusetCpus(virCgroupPtr group, char **cpus);
 
 int virCgroupRemove(virCgroupPtr group);
-- 
2.24.1


Reply via email to