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-sysfs.c | |
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-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index cf150011d808..00cdc987b525 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/blktrace_api.h> | 9 | #include <linux/blktrace_api.h> |
10 | 10 | ||
11 | #include "blk.h" | 11 | #include "blk.h" |
12 | #include "blk-cgroup.h" | ||
12 | 13 | ||
13 | struct queue_sysfs_entry { | 14 | struct queue_sysfs_entry { |
14 | struct attribute attr; | 15 | struct attribute attr; |
@@ -486,7 +487,7 @@ static void blk_release_queue(struct kobject *kobj) | |||
486 | elevator_exit(q->elevator); | 487 | elevator_exit(q->elevator); |
487 | } | 488 | } |
488 | 489 | ||
489 | blk_throtl_exit(q); | 490 | blkcg_exit_queue(q); |
490 | 491 | ||
491 | if (rl->rq_pool) | 492 | if (rl->rq_pool) |
492 | mempool_destroy(rl->rq_pool); | 493 | mempool_destroy(rl->rq_pool); |
@@ -494,7 +495,6 @@ static void blk_release_queue(struct kobject *kobj) | |||
494 | if (q->queue_tags) | 495 | if (q->queue_tags) |
495 | __blk_queue_free_tags(q); | 496 | __blk_queue_free_tags(q); |
496 | 497 | ||
497 | blk_throtl_release(q); | ||
498 | blk_trace_shutdown(q); | 498 | blk_trace_shutdown(q); |
499 | 499 | ||
500 | bdi_destroy(&q->backing_dev_info); | 500 | bdi_destroy(&q->backing_dev_info); |