diff options
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index a491a6d56ecf..2b866ec1dcea 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -108,10 +108,8 @@ struct blkio_group { | |||
108 | void *key; | 108 | void *key; |
109 | struct hlist_node blkcg_node; | 109 | struct hlist_node blkcg_node; |
110 | unsigned short blkcg_id; | 110 | unsigned short blkcg_id; |
111 | #ifdef CONFIG_DEBUG_BLK_CGROUP | ||
112 | /* Store cgroup path */ | 111 | /* Store cgroup path */ |
113 | char path[128]; | 112 | char path[128]; |
114 | #endif | ||
115 | /* The device MKDEV(major, minor), this group has been created for */ | 113 | /* The device MKDEV(major, minor), this group has been created for */ |
116 | dev_t dev; | 114 | dev_t dev; |
117 | 115 | ||
@@ -147,6 +145,11 @@ struct blkio_policy_type { | |||
147 | extern void blkio_policy_register(struct blkio_policy_type *); | 145 | extern void blkio_policy_register(struct blkio_policy_type *); |
148 | extern void blkio_policy_unregister(struct blkio_policy_type *); | 146 | extern void blkio_policy_unregister(struct blkio_policy_type *); |
149 | 147 | ||
148 | static inline char *blkg_path(struct blkio_group *blkg) | ||
149 | { | ||
150 | return blkg->path; | ||
151 | } | ||
152 | |||
150 | #else | 153 | #else |
151 | 154 | ||
152 | struct blkio_group { | 155 | struct blkio_group { |
@@ -158,6 +161,8 @@ struct blkio_policy_type { | |||
158 | static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } | 161 | static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } |
159 | static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } | 162 | static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } |
160 | 163 | ||
164 | static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } | ||
165 | |||
161 | #endif | 166 | #endif |
162 | 167 | ||
163 | #define BLKIO_WEIGHT_MIN 100 | 168 | #define BLKIO_WEIGHT_MIN 100 |
@@ -165,10 +170,6 @@ static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } | |||
165 | #define BLKIO_WEIGHT_DEFAULT 500 | 170 | #define BLKIO_WEIGHT_DEFAULT 500 |
166 | 171 | ||
167 | #ifdef CONFIG_DEBUG_BLK_CGROUP | 172 | #ifdef CONFIG_DEBUG_BLK_CGROUP |
168 | static inline char *blkg_path(struct blkio_group *blkg) | ||
169 | { | ||
170 | return blkg->path; | ||
171 | } | ||
172 | void blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg); | 173 | void blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg); |
173 | void blkiocg_update_dequeue_stats(struct blkio_group *blkg, | 174 | void blkiocg_update_dequeue_stats(struct blkio_group *blkg, |
174 | unsigned long dequeue); | 175 | unsigned long dequeue); |
@@ -197,7 +198,6 @@ BLKG_FLAG_FNS(idling) | |||
197 | BLKG_FLAG_FNS(empty) | 198 | BLKG_FLAG_FNS(empty) |
198 | #undef BLKG_FLAG_FNS | 199 | #undef BLKG_FLAG_FNS |
199 | #else | 200 | #else |
200 | static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } | ||
201 | static inline void blkiocg_update_avg_queue_size_stats( | 201 | static inline void blkiocg_update_avg_queue_size_stats( |
202 | struct blkio_group *blkg) {} | 202 | struct blkio_group *blkg) {} |
203 | static inline void blkiocg_update_dequeue_stats(struct blkio_group *blkg, | 203 | static inline void blkiocg_update_dequeue_stats(struct blkio_group *blkg, |