
This patch does a couple of primary things: Firstly it allows you to use "hda", etc. as a path for getting block device stats from fullvirt domains. Secondly it separates out the stats code into a new file called 'stats_linux.c'. The reasoning behind the name is that this code can be shared between Xen & QEMU, and that the code is Linux-specific (it never worked on Solaris, but now this is explicit). I anticipate a 'stats_solaris.c' file once I can get Solaris + Xen going on a test machine. Also we try to detect the case where the block dev stats of a fullvirt domain are stuck at 0 -- caused by there being no frontend driver connected. We detect the condition by a query to xenstore. XENVBD_MAJOR is no longer hard-coded if we can get it instead from Linux header files. This patch adds bytes written/read to block devices for Xen PV domains if available. This also corrects a bug where stats from xvdb, xvdc, .. could not be read out because the device number was being miscalculated. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903