[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.14] tools/libxenstat: fix populating vbd.rd_sect



commit c3cc6e206ff79c6117b841891d832694597bd5af
Author:     Richard Kojedzinszky <richard@xxxxxxxxx>
AuthorDate: Fri Jul 9 10:06:45 2021 +0200
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jul 15 11:59:32 2021 +0100

    tools/libxenstat: fix populating vbd.rd_sect
    
    Fixes: 91c3e3dc91d6 ("tools/xentop: Display '-' when stats are not 
available.")
    Signed-off-by: Richard Kojedzinszky <richard@xxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    (cherry picked from commit 89d57f291e37b4769ab26db919eba46548f2e13e)
---
 tools/xenstat/libxenstat/src/xenstat_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xenstat/libxenstat/src/xenstat_linux.c 
b/tools/xenstat/libxenstat/src/xenstat_linux.c
index 9c0cb277c5..ed7a02ab52 100644
--- a/tools/xenstat/libxenstat/src/xenstat_linux.c
+++ b/tools/xenstat/libxenstat/src/xenstat_linux.c
@@ -474,7 +474,7 @@ int xenstat_collect_vbds(xenstat_node * node)
                                (read_attributes_vbd(dp->d_name, 
"statistics/wr_req", buf, 256)<=0) ||
                                ((ret = sscanf(buf, "%llu", &vbd.wr_reqs)) != 
1) ||
                                (read_attributes_vbd(dp->d_name, 
"statistics/rd_sect", buf, 256)<=0) ||
-                               ((ret = sscanf(buf, "%llu", &vbd.wr_sects)) != 
1) ||
+                               ((ret = sscanf(buf, "%llu", &vbd.rd_sects)) != 
1) ||
                                (read_attributes_vbd(dp->d_name, 
"statistics/wr_sect", buf, 256)<=0) ||
                                ((ret = sscanf(buf, "%llu", &vbd.wr_sects)) != 
1))
                        {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.