[libvirt] [PATCH 23/47] vircgroup: extract virCgroupV1GetBlkioIoDeviceServiced

Ján Tomko jtomko at redhat.com
Tue Sep 25 08:21:28 UTC 2018


On Tue, Sep 18, 2018 at 05:45:44PM +0200, Pavel Hrdina wrote:
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>---
> src/util/vircgroup.c        | 83 ++--------------------------------
> src/util/vircgroupbackend.h |  9 ++++
> src/util/vircgrouppriv.h    |  2 +
> src/util/vircgroupv1.c      | 89 +++++++++++++++++++++++++++++++++++++
> 4 files changed, 104 insertions(+), 79 deletions(-)
>

>diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
>index 4b9c03830c..206318d436 100644
>--- a/src/util/vircgroupv1.c
>+++ b/src/util/vircgroupv1.c
>@@ -1049,6 +1049,94 @@ virCgroupV1GetBlkioIoServiced(virCgroupPtr group,
> }
>
>
>+static int
>+virCgroupV1GetBlkioIoDeviceServiced(virCgroupPtr group,
>+                                    const char *path,
>+                                    long long *bytes_read,
>+                                    long long *bytes_write,
>+                                    long long *requests_read,
>+                                    long long *requests_write)
>+{
>+    VIR_AUTOFREE(char *) str1 = NULL;
>+    VIR_AUTOFREE(char *) str2 = NULL;
>+    VIR_AUTOFREE(char *) str3 = NULL;

Just like in the last patch. Instead of:
>+    char *p1, *p2;

use:

>-    char *p1 = NULL;
>-    char *p2 = NULL;

>+    size_t i;
>+
>+    const char *value_names[] = {
>+        "Read ",
>+        "Write "
>+    };

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180925/ff4e5243/attachment-0001.sig>


More information about the libvir-list mailing list