The new virCgroupSetupBlkioTune() centralized all the code
that call those functions inside vircgroup.c.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/libvirt_private.syms | 11 ----------
src/util/vircgroup.c | 44 ++++++++++++++++++++--------------------
src/util/vircgroup.h | 41 -------------------------------------
3 files changed, 22 insertions(+), 74 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ffd76253b3..3dc65916bf 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1672,11 +1672,6 @@ virCgroupDenyAllDevices;
virCgroupDenyDevice;
virCgroupDenyDevicePath;
virCgroupFree;
-virCgroupGetBlkioDeviceReadBps;
-virCgroupGetBlkioDeviceReadIops;
-virCgroupGetBlkioDeviceWeight;
-virCgroupGetBlkioDeviceWriteBps;
-virCgroupGetBlkioDeviceWriteIops;
virCgroupGetBlkioIoDeviceServiced;
virCgroupGetBlkioIoServiced;
virCgroupGetBlkioWeight;
@@ -1715,12 +1710,6 @@ virCgroupNewThread;
virCgroupPathOfController;
virCgroupRemove;
virCgroupSetAndRetrieveCpuShares;
-virCgroupSetBlkioDeviceReadBps;
-virCgroupSetBlkioDeviceReadIops;
-virCgroupSetBlkioDeviceWeight;
-virCgroupSetBlkioDeviceWriteBps;
-virCgroupSetBlkioDeviceWriteIops;
-virCgroupSetBlkioWeight;
virCgroupSetCpuCfsPeriod;
virCgroupSetCpuCfsQuota;
virCgroupSetCpusetCpus;
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index dad475c436..8ee37cde7c 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1385,7 +1385,7 @@ virCgroupGetBlkioIoDeviceServiced(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioWeight(virCgroupPtr group, unsigned int weight)
{
VIR_CGROUP_BACKEND_CALL(group, VIR_CGROUP_CONTROLLER_BLKIO,
@@ -1416,7 +1416,7 @@ virCgroupGetBlkioWeight(virCgroupPtr group, unsigned int *weight)
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceReadIops(virCgroupPtr group,
const char *path,
unsigned int riops)
@@ -1434,7 +1434,7 @@ virCgroupSetBlkioDeviceReadIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group,
const char *path,
unsigned int wiops)
@@ -1452,7 +1452,7 @@ virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceReadBps(virCgroupPtr group,
const char *path,
unsigned long long rbps)
@@ -1469,7 +1469,7 @@ virCgroupSetBlkioDeviceReadBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group,
const char *path,
unsigned long long wbps)
@@ -1488,7 +1488,7 @@ virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWeight(virCgroupPtr group,
const char *path,
unsigned int weight)
@@ -1505,7 +1505,7 @@ virCgroupSetBlkioDeviceWeight(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceReadIops(virCgroupPtr group,
const char *path,
unsigned int *riops)
@@ -1522,7 +1522,7 @@ virCgroupGetBlkioDeviceReadIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group,
const char *path,
unsigned int *wiops)
@@ -1539,7 +1539,7 @@ virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceReadBps(virCgroupPtr group,
const char *path,
unsigned long long *rbps)
@@ -1556,7 +1556,7 @@ virCgroupGetBlkioDeviceReadBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group,
const char *path,
unsigned long long *wbps)
@@ -1573,7 +1573,7 @@ virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWeight(virCgroupPtr group,
const char *path,
unsigned int *weight)
@@ -2974,7 +2974,7 @@ virCgroupGetBlkioIoDeviceServiced(virCgroupPtr group G_GNUC_UNUSED,
}
-int
+static int
virCgroupSetBlkioWeight(virCgroupPtr group G_GNUC_UNUSED,
unsigned int weight G_GNUC_UNUSED)
{
@@ -2994,7 +2994,7 @@ virCgroupGetBlkioWeight(virCgroupPtr group G_GNUC_UNUSED,
}
-int
+static int
virCgroupSetBlkioDeviceWeight(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int weight G_GNUC_UNUSED)
@@ -3004,7 +3004,7 @@ virCgroupSetBlkioDeviceWeight(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupSetBlkioDeviceReadIops(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int riops G_GNUC_UNUSED)
@@ -3014,7 +3014,7 @@ virCgroupSetBlkioDeviceReadIops(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int wiops G_GNUC_UNUSED)
@@ -3024,7 +3024,7 @@ virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupSetBlkioDeviceReadBps(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned long long rbps G_GNUC_UNUSED)
@@ -3034,7 +3034,7 @@ virCgroupSetBlkioDeviceReadBps(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned long long wbps G_GNUC_UNUSED)
@@ -3044,7 +3044,7 @@ virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupGetBlkioDeviceWeight(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int *weight G_GNUC_UNUSED)
@@ -3054,7 +3054,7 @@ virCgroupGetBlkioDeviceWeight(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupGetBlkioDeviceReadIops(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int *riops G_GNUC_UNUSED)
@@ -3064,7 +3064,7 @@ virCgroupGetBlkioDeviceReadIops(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned int *wiops G_GNUC_UNUSED)
@@ -3074,7 +3074,7 @@ virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupGetBlkioDeviceReadBps(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned long long *rbps G_GNUC_UNUSED)
@@ -3084,7 +3084,7 @@ virCgroupGetBlkioDeviceReadBps(virCgroupPtr group G_GNUC_UNUSED,
return -1;
}
-int
+static int
virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group G_GNUC_UNUSED,
const char *path G_GNUC_UNUSED,
unsigned long long *wbps G_GNUC_UNUSED)
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 10c4b75863..35a11e6b67 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -121,7 +121,6 @@ int virCgroupAddProcess(virCgroupPtr group, pid_t pid);
int virCgroupAddMachineProcess(virCgroupPtr group, pid_t pid);
int virCgroupAddThread(virCgroupPtr group, pid_t pid);
-int virCgroupSetBlkioWeight(virCgroupPtr group, unsigned int weight);
int virCgroupGetBlkioWeight(virCgroupPtr group, unsigned int *weight);
int virCgroupGetBlkioIoServiced(virCgroupPtr group,
@@ -136,46 +135,6 @@ int virCgroupGetBlkioIoDeviceServiced(virCgroupPtr group,
long long *requests_read,
long long *requests_write);
-int virCgroupSetBlkioDeviceWeight(virCgroupPtr group,
- const char *path,
- unsigned int weight);
-
-int virCgroupSetBlkioDeviceReadIops(virCgroupPtr group,
- const char *path,
- unsigned int riops);
-
-int virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group,
- const char *path,
- unsigned int wiops);
-
-int virCgroupSetBlkioDeviceReadBps(virCgroupPtr group,
- const char *path,
- unsigned long long rbps);
-
-int virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group,
- const char *path,
- unsigned long long wbps);
-
-int virCgroupGetBlkioDeviceWeight(virCgroupPtr group,
- const char *path,
- unsigned int *weight);
-
-int virCgroupGetBlkioDeviceReadIops(virCgroupPtr group,
- const char *path,
- unsigned int *riops);
-
-int virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group,
- const char *path,
- unsigned int *wiops);
-
-int virCgroupGetBlkioDeviceReadBps(virCgroupPtr group,
- const char *path,
- unsigned long long *rbps);
-
-int virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group,
- const char *path,
- unsigned long long *wbps);
-
int virCgroupSetMemory(virCgroupPtr group, unsigned long long kb);
int virCgroupGetMemoryStat(virCgroupPtr group,
unsigned long long *cache,
--
2.24.1