Skip to content

Commit

Permalink
blk-mq: reimplement blk_mq_hw_queue_mapped
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Ming Lei authored and axboe committed Apr 10, 2018
1 parent efea845 commit 127276c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static inline bool blk_mq_hctx_stopped(struct blk_mq_hw_ctx *hctx)

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,
Expand Down

0 comments on commit 127276c

Please sign in to comment.