aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback/common.h
diff options
context:
space:
mode:
authorBob Liu <bob.liu@oracle.com>2015-12-09 07:44:02 +0800
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2016-01-04 12:21:25 -0500
commitdb6fbc106786f26d95889c50c18b1f28aa543a17 (patch)
tree21d9bed91528e2477d4a318556de7afb326dbb6f /drivers/block/xen-blkback/common.h
parentxen/blkfront: Handle non-indirect grant with 64KB pages (diff)
downloadlinux-dev-db6fbc106786f26d95889c50c18b1f28aa543a17.tar.xz
linux-dev-db6fbc106786f26d95889c50c18b1f28aa543a17.zip
xen/blkback: make st_ statistics per ring
Make st_* statistics per ring and the VBD sysfs would iterate over all the rings. Note: xenvbd_sysfs_delif() is called in xen_blkbk_remove() before all rings are torn down, so it's safe. Signed-off-by: Bob Liu <bob.liu@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> --- v2: Aligned the variables on the same column.
Diffstat (limited to 'drivers/block/xen-blkback/common.h')
-rw-r--r--drivers/block/xen-blkback/common.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index 3c244ecf22a4..b27c5ba15600 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -298,6 +298,16 @@ struct xen_blkif_ring {
atomic_t persistent_gnt_in_use;
unsigned long next_lru;
+ /* Statistics. */
+ unsigned long st_print;
+ unsigned long long st_rd_req;
+ unsigned long long st_wr_req;
+ unsigned long long st_oo_req;
+ unsigned long long st_f_req;
+ unsigned long long st_ds_req;
+ unsigned long long st_rd_sect;
+ unsigned long long st_wr_sect;
+
/* Used by the kworker that offload work from the persistent purge. */
struct list_head persistent_purge_list;
struct work_struct persistent_purge_work;
@@ -328,16 +338,6 @@ struct xen_blkif {
struct completion drain_complete;
atomic_t drain;
- /* statistics */
- unsigned long st_print;
- unsigned long long st_rd_req;
- unsigned long long st_wr_req;
- unsigned long long st_oo_req;
- unsigned long long st_f_req;
- unsigned long long st_ds_req;
- unsigned long long st_rd_sect;
- unsigned long long st_wr_sect;
-
struct work_struct free_work;
unsigned int nr_ring_pages;
/* All rings for this device. */