[libsys-virt-perl] 05/11: block_stats: Fix rd_req and wr_req compat hash keys

Salvatore Bonaccorso carnil at debian.org
Tue Jan 23 20:40:25 UTC 2018


This is an automated email from the git hooks/post-receive script.

carnil pushed a commit to branch master
in repository libsys-virt-perl.

commit 1a06a7cbb2214b40532e9c442e920baf6a79ec3c
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Jan 15 19:50:10 2018 +0200

    block_stats: Fix rd_req and wr_req compat hash keys
    
    When virDomainBlockStatsFlags with NULL params fails, the returned
    read and write requests hash keys are said to be backwards compatible
    with the key names success case. However, they were rd_reqs and
    wr_reqs (in plural) as opposed to the success case's rd_req and
    wr_req.
    
    There is also a similar flush_reqs key, but that one does not have a
    corresponding value in the success case's hash, so it is left
    unmodified here.
---
 Virt.xs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Virt.xs b/Virt.xs
index c47b915..a6f0477 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -5611,9 +5611,9 @@ block_stats(dom, path, flags=0)
               field = NULL;
               /* For back compat with previous hash above */
               if (strcmp(params[i].field, "rd_operations") == 0)
-                  field = "rd_reqs";
+                  field = "rd_req";
               else if (strcmp(params[i].field, "wr_operations") == 0)
-                  field = "wr_reqs";
+                  field = "wr_req";
               else if (strcmp(params[i].field, "flush_operations") == 0)
                   field = "flush_reqs";
               if (field) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsys-virt-perl.git



More information about the Pkg-perl-cvs-commits mailing list