Re: [PATCH] fix path to xen device statistics for newer kernels

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

 



On 09/08/2010 03:35 PM, Guido Günther wrote:
> Hi,
> it seems Xen changed the paths to the block device statistics in sysfs:
> from "/sys/devices/xen-backend/vbd-%d-%d/statistics/%s" to
> "/sys/bus/xen-backend/devices/vbd-%d-%d/statistics/%s":
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596004
> 
> Attached patch fixes this. O.k. to apply?
>  -- Guido
> 

> 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);

ACK if a brief comment is added explaining the situation.

- Cole

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]