aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 16:15:12 -0500
committerJens Axboe <axboe@kernel.dk>2012-03-06 15:27:23 -0500
commit5efd611351d1a847c72d74fb12ff4bd187c0cb2c (patch)
treebac28206d088426ab872eea98155cc100bd8d9b1 /block/blk-cgroup.h
parent7ee9c5620504906e98451dc9a1945b2b9e892cb8 (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.h7
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
218extern int blkcg_init_queue(struct request_queue *q);
219extern void blkcg_drain_queue(struct request_queue *q);
220extern void blkcg_exit_queue(struct request_queue *q);
221
218/* Blkio controller policy registration */ 222/* Blkio controller policy registration */
219extern void blkio_policy_register(struct blkio_policy_type *); 223extern void blkio_policy_register(struct blkio_policy_type *);
220extern void blkio_policy_unregister(struct blkio_policy_type *); 224extern void blkio_policy_unregister(struct blkio_policy_type *);
@@ -233,6 +237,9 @@ struct blkio_group {
233struct blkio_policy_type { 237struct blkio_policy_type {
234}; 238};
235 239
240static inline int blkcg_init_queue(struct request_queue *q) { return 0; }
241static inline void blkcg_drain_queue(struct request_queue *q) { }
242static inline void blkcg_exit_queue(struct request_queue *q) { }
236static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } 243static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { }
237static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } 244static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { }
238static inline void blkg_destroy_all(struct request_queue *q) { } 245static inline void blkg_destroy_all(struct request_queue *q) { }