aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2009-12-03 12:59:48 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-12-03 13:28:52 -0500
commit2868ef7b39490e6b41c2c61cd9a5cd891e778b54 (patch)
treee50e169e984d8bd201de2f73f98e31a65c028feb /block/blk-cgroup.h
parentb1c3576961847da26c91b1e97f226bb66be5fa3f (diff)
blkio: Some debugging aids for CFQ
o Some debugging aids for CFQ. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index cd50a2f8733e..3573199b298b 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -27,12 +27,25 @@ struct blkio_group {
27 void *key; 27 void *key;
28 struct hlist_node blkcg_node; 28 struct hlist_node blkcg_node;
29 unsigned short blkcg_id; 29 unsigned short blkcg_id;
30#ifdef CONFIG_DEBUG_BLK_CGROUP
31 /* Store cgroup path */
32 char path[128];
33#endif
30}; 34};
31 35
32#define BLKIO_WEIGHT_MIN 100 36#define BLKIO_WEIGHT_MIN 100
33#define BLKIO_WEIGHT_MAX 1000 37#define BLKIO_WEIGHT_MAX 1000
34#define BLKIO_WEIGHT_DEFAULT 500 38#define BLKIO_WEIGHT_DEFAULT 500
35 39
40#ifdef CONFIG_DEBUG_BLK_CGROUP
41static inline char *blkg_path(struct blkio_group *blkg)
42{
43 return blkg->path;
44}
45#else
46static inline char *blkg_path(struct blkio_group *blkg) { return NULL; }
47#endif
48
36#ifdef CONFIG_BLK_CGROUP 49#ifdef CONFIG_BLK_CGROUP
37extern struct blkio_cgroup blkio_root_cgroup; 50extern struct blkio_cgroup blkio_root_cgroup;
38extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); 51extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup);