[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.8.3-1-2-g4097bbd

Guido Günther agx at sigxcpu.org
Fri Sep 10 19:04:01 UTC 2010


The following commit has been merged in the master branch:
commit 4097bbd41462fd617e87787e94158d93294a687f
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Sep 10 21:03:27 2010 +0200

    New patch 0007-Fix-block-statistics-with-newer-versions-of-Xen.patch
    
    Fix block statistics with newer versions of Xen
    
    Closes: #596004
    Thanks: Gerald Turner for the patch

diff --git a/debian/patches/0007-Fix-block-statistics-with-newer-versions-of-Xen.patch b/debian/patches/0007-Fix-block-statistics-with-newer-versions-of-Xen.patch
new file mode 100644
index 0000000..a746033
--- /dev/null
+++ b/debian/patches/0007-Fix-block-statistics-with-newer-versions-of-Xen.patch
@@ -0,0 +1,42 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 10 Sep 2010 15:57:35 +0200
+Subject: [PATCH] Fix block statistics with newer versions of Xen
+
+Apparently the xen block device statistics moved from
+"/sys/devices/xen-backend/vbd-%d-%d/statistics/%s"
+to
+"/sys/bus/xen-backend/devices/vbd-%d-%d/statistics/%s"
+
+* src/xen/block_stats.c: try the extra path in case of failure to
+  find the statistics in /sys
+
+Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=8a70113a9949fd482151f2962dd760364525a996
+Closes: #596004
+---
+ src/xen/block_stats.c |   12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
+index 6e7a5c3..1d875f2 100644
+--- a/src/xen/block_stats.c
++++ b/src/xen/block_stats.c
+@@ -118,6 +118,18 @@ read_bd_stat (int device, int domid, const char *str)
+     int64_t r;
+ 
+     snprintf (path, sizeof path,
++              "/sys/bus/xen-backend/devices/vbd-%d-%d/statistics/%s",
++              domid, device, str);
++    r = read_stat (path);
++    if (r >= 0) return r;
++
++    snprintf (path, sizeof path,
++              "/sys/bus/xen-backend/devices/tap-%d-%d/statistics/%s",
++              domid, device, str);
++    r = read_stat (path);
++    if (r >= 0) return r;
++
++    snprintf (path, sizeof path,
+               "/sys/devices/xen-backend/vbd-%d-%d/statistics/%s",
+               domid, device, str);
+     r = read_stat (path);
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 006975c..1046874 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 0004-fix-Debian-specific-path-to-hvm-loader.patch
 0005-Terminate-nc-on-EOF.patch
 0006-patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
+0007-Fix-block-statistics-with-newer-versions-of-Xen.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list