Previous patch moved all duplicated code that were setting
and getting BlkioDevice parameters to vircgroup.c. We can
turn them into static and spare a few symbols in
libvirt_private.syms.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/libvirt_private.syms | 10 ----------
src/util/vircgroup.c | 40 ++++++++++++++++++++--------------------
src/util/vircgroup.h | 40 ----------------------------------------
3 files changed, 20 insertions(+), 70 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index e26bfab101..2bbfa4bd9d 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1671,11 +1671,6 @@ virCgroupDenyAllDevices;
virCgroupDenyDevice;
virCgroupDenyDevicePath;
virCgroupFree;
-virCgroupGetBlkioDeviceReadBps;
-virCgroupGetBlkioDeviceReadIops;
-virCgroupGetBlkioDeviceWeight;
-virCgroupGetBlkioDeviceWriteBps;
-virCgroupGetBlkioDeviceWriteIops;
virCgroupGetBlkioIoDeviceServiced;
virCgroupGetBlkioIoServiced;
virCgroupGetBlkioWeight;
@@ -1712,11 +1707,6 @@ virCgroupNewSelf;
virCgroupNewThread;
virCgroupPathOfController;
virCgroupRemove;
-virCgroupSetBlkioDeviceReadBps;
-virCgroupSetBlkioDeviceReadIops;
-virCgroupSetBlkioDeviceWeight;
-virCgroupSetBlkioDeviceWriteBps;
-virCgroupSetBlkioDeviceWriteIops;
virCgroupSetBlkioWeight;
virCgroupSetCpuCfsPeriod;
virCgroupSetCpuCfsQuota;
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 302352aca3..261e63f6ec 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1415,7 +1415,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)
@@ -1433,7 +1433,7 @@ virCgroupSetBlkioDeviceReadIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group,
const char *path,
unsigned int wiops)
@@ -1451,7 +1451,7 @@ virCgroupSetBlkioDeviceWriteIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceReadBps(virCgroupPtr group,
const char *path,
unsigned long long rbps)
@@ -1468,7 +1468,7 @@ virCgroupSetBlkioDeviceReadBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group,
const char *path,
unsigned long long wbps)
@@ -1487,7 +1487,7 @@ virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupSetBlkioDeviceWeight(virCgroupPtr group,
const char *path,
unsigned int weight)
@@ -1504,7 +1504,7 @@ virCgroupSetBlkioDeviceWeight(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceReadIops(virCgroupPtr group,
const char *path,
unsigned int *riops)
@@ -1521,7 +1521,7 @@ virCgroupGetBlkioDeviceReadIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group,
const char *path,
unsigned int *wiops)
@@ -1538,7 +1538,7 @@ virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceReadBps(virCgroupPtr group,
const char *path,
unsigned long long *rbps)
@@ -1555,7 +1555,7 @@ virCgroupGetBlkioDeviceReadBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group,
const char *path,
unsigned long long *wbps)
@@ -1572,7 +1572,7 @@ virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group,
*
* Returns: 0 on success, -1 on error
*/
-int
+static int
virCgroupGetBlkioDeviceWeight(virCgroupPtr group,
const char *path,
unsigned int *weight)
@@ -2993,7 +2993,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)
@@ -3003,7 +3003,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)
@@ -3013,7 +3013,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)
@@ -3023,7 +3023,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)
@@ -3033,7 +3033,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)
@@ -3043,7 +3043,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)
@@ -3053,7 +3053,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)
@@ -3063,7 +3063,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)
@@ -3073,7 +3073,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)
@@ -3083,7 +3083,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 6bd3f4fe9d..d50a8d69d4 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -135,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 virCgroupSetupBlkioDeviceWeight(virCgroupPtr cgroup,
const char *path,
unsigned int *weight);
--
2.24.1