diff options
| author | Ming Lei <ming.lei@redhat.com> | 2018-04-08 05:48:13 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-04-10 10:38:46 -0400 |
| commit | 127276c6ce5a30fcc806b7fe53015f4f89b62956 (patch) | |
| tree | 7d503a3a1ecaa0c67fcd7c6e349b7845cfb0d9fa /block | |
| parent | efea8450c3d2d3918029b36f59ef612be57d91ae (diff) | |
blk-mq: reimplement blk_mq_hw_queue_mapped
Now the actual meaning of queue mapped is that if there is any online
CPU mapped to this hctx, so implement blk_mq_hw_queue_mapped() in this
way.
Cc: Stefan Haberland <sth@linux.vnet.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/blk-mq.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 88c558f71819..502af371b83b 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h | |||
| @@ -181,7 +181,7 @@ static inline bool blk_mq_hctx_stopped(struct blk_mq_hw_ctx *hctx) | |||
| 181 | 181 | ||
| 182 | static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx) | 182 | static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx) |
| 183 | { | 183 | { |
| 184 | return hctx->nr_ctx && hctx->tags; | 184 | return cpumask_first_and(hctx->cpumask, cpu_online_mask) < nr_cpu_ids; |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part, | 187 | void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part, |
