diff options
author | Christoph Hellwig <hch@lst.de> | 2013-10-25 14:45:58 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-10-25 14:45:58 +0100 |
commit | 280d45f6c35d8d7a0fe20c36caf426e3ac139cf9 (patch) | |
tree | b3b059cfc6c43ce301fd7fc309f65ea888a9311a /block | |
parent | f2298c0403b0dfcaef637eba0c02c4a06d7a25ab (diff) | |
download | linux-280d45f6c35d8d7a0fe20c36caf426e3ac139cf9.tar.gz linux-280d45f6c35d8d7a0fe20c36caf426e3ac139cf9.tar.bz2 linux-280d45f6c35d8d7a0fe20c36caf426e3ac139cf9.zip |
blk-mq: add blk_mq_stop_hw_queues
Add a helper to iterate over all hw queues and stop them. This is useful
for driver that implement PM suspend functionality.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Modified to just call blk_mq_stop_hw_queue() by Jens.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index f21ec964e411..ac804c635040 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -672,6 +672,16 @@ void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx) } EXPORT_SYMBOL(blk_mq_stop_hw_queue); +void blk_mq_stop_hw_queues(struct request_queue *q) +{ + struct blk_mq_hw_ctx *hctx; + int i; + + queue_for_each_hw_ctx(q, hctx, i) + blk_mq_stop_hw_queue(hctx); +} +EXPORT_SYMBOL(blk_mq_stop_hw_queues); + void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx) { clear_bit(BLK_MQ_S_STOPPED, &hctx->state); |