diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-10-28 17:19:15 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-02 12:50:19 -0600 |
commit | 5d1b25c1ecabb37f8eb58c8e9dd74f77f703e5d9 (patch) | |
tree | b2d41828dd60300ca642af710fe633db3ad6536f /block/blk-mq.h | |
parent | bc27c01b5c46d3bfec42c96537c7a3fae0bb2cc4 (diff) | |
download | linux-5d1b25c1ecabb37f8eb58c8e9dd74f77f703e5d9.tar.gz linux-5d1b25c1ecabb37f8eb58c8e9dd74f77f703e5d9.tar.bz2 linux-5d1b25c1ecabb37f8eb58c8e9dd74f77f703e5d9.zip |
blk-mq: Introduce blk_mq_hctx_stopped()
Multiple functions test the BLK_MQ_S_STOPPED bit so introduce
a helper function that performs this test.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index e5d25249028c..ac772dac7ce8 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -100,6 +100,11 @@ static inline void blk_mq_set_alloc_data(struct blk_mq_alloc_data *data, data->hctx = hctx; } +static inline bool blk_mq_hctx_stopped(struct blk_mq_hw_ctx *hctx) +{ + return test_bit(BLK_MQ_S_STOPPED, &hctx->state); +} + static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx) { return hctx->nr_ctx && hctx->tags; |