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>
static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
{
- return hctx->nr_ctx && hctx->tags;
+ return cpumask_first_and(hctx->cpumask, cpu_online_mask) < nr_cpu_ids;
}
void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,