summaryrefslogtreecommitdiff
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 13:14:59 -0800
committerJens Axboe <axboe@kernel.dk>2012-03-06 21:27:22 +0100
commit6ecf23afab13c39d3bb0e2d826d0984b0dd53733 (patch)
tree48436e2eb507d623ff2c2332aa34e9b7380f33e1 /block/blk-throttle.c
parentd732580b4eb31553c63744a47d590f770cafb8f0 (diff)
downloadlwn-6ecf23afab13c39d3bb0e2d826d0984b0dd53733.tar.gz
lwn-6ecf23afab13c39d3bb0e2d826d0984b0dd53733.zip
block: extend queue bypassing to cover blkcg policies
Extend queue bypassing such that dying queue is always bypassing and blk-throttle is drained on bypass. With blkcg policies updated to test blk_queue_bypass() instead of blk_queue_dead(), this ensures that no bio or request is held by or going through blkcg policies on a bypassing queue. This will be used to implement blkg cleanup on elevator switches and policy changes. 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-throttle.c')
-rw-r--r--block/blk-throttle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 5eed6a76721d..702c0e64e09f 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -310,7 +310,7 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td)
struct request_queue *q = td->queue;
/* no throttling for dead queue */
- if (unlikely(blk_queue_dead(q)))
+ if (unlikely(blk_queue_bypass(q)))
return NULL;
rcu_read_lock();
@@ -335,7 +335,7 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td)
spin_lock_irq(q->queue_lock);
/* Make sure @q is still alive */
- if (unlikely(blk_queue_dead(q))) {
+ if (unlikely(blk_queue_bypass(q))) {
kfree(tg);
return NULL;
}