diff options
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 13 |
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 | ||
41 | static inline char *blkg_path(struct blkio_group *blkg) | ||
42 | { | ||
43 | return blkg->path; | ||
44 | } | ||
45 | #else | ||
46 | static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } | ||
47 | #endif | ||
48 | |||
36 | #ifdef CONFIG_BLK_CGROUP | 49 | #ifdef CONFIG_BLK_CGROUP |
37 | extern struct blkio_cgroup blkio_root_cgroup; | 50 | extern struct blkio_cgroup blkio_root_cgroup; |
38 | extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); | 51 | extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); |