diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-05 16:15:12 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-06 15:27:23 -0500 |
commit | 5efd611351d1a847c72d74fb12ff4bd187c0cb2c (patch) | |
tree | bac28206d088426ab872eea98155cc100bd8d9b1 /block/blk-cgroup.h | |
parent | 7ee9c5620504906e98451dc9a1945b2b9e892cb8 (diff) |
blkcg: add blkcg_{init|drain|exit}_queue()
Currently block core calls directly into blk-throttle for init, drain
and exit. This patch adds blkcg_{init|drain|exit}_queue() which wraps
the blk-throttle functions. This is to give more control and
visiblity to blkcg core layer for proper layering. Further patches
will add logic common to blkcg policies to the functions.
While at it, collapse blk_throtl_release() into blk_throtl_exit().
There's no reason to keep them separate.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index ca1fc637bd6e..3bc171080e93 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -215,6 +215,10 @@ struct blkio_policy_type { | |||
215 | enum blkio_policy_id plid; | 215 | enum blkio_policy_id plid; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | extern int blkcg_init_queue(struct request_queue *q); | ||
219 | extern void blkcg_drain_queue(struct request_queue *q); | ||
220 | extern void blkcg_exit_queue(struct request_queue *q); | ||
221 | |||
218 | /* Blkio controller policy registration */ | 222 | /* Blkio controller policy registration */ |
219 | extern void blkio_policy_register(struct blkio_policy_type *); | 223 | extern void blkio_policy_register(struct blkio_policy_type *); |
220 | extern void blkio_policy_unregister(struct blkio_policy_type *); | 224 | extern void blkio_policy_unregister(struct blkio_policy_type *); |
@@ -233,6 +237,9 @@ struct blkio_group { | |||
233 | struct blkio_policy_type { | 237 | struct blkio_policy_type { |
234 | }; | 238 | }; |
235 | 239 | ||
240 | static inline int blkcg_init_queue(struct request_queue *q) { return 0; } | ||
241 | static inline void blkcg_drain_queue(struct request_queue *q) { } | ||
242 | static inline void blkcg_exit_queue(struct request_queue *q) { } | ||
236 | static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } | 243 | static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } |
237 | static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } | 244 | static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } |
238 | static inline void blkg_destroy_all(struct request_queue *q) { } | 245 | static inline void blkg_destroy_all(struct request_queue *q) { } |