Re: [PATCH v2 9/9] blk-mq: support per-distpatch_queue flush machinery

From: Jens Axboe
Date: Fri Sep 12 2014 - 11:20:20 EST


On 2014-09-12 08:47, Ming Lei wrote:
@@ -31,7 +33,15 @@ extern struct ida blk_queue_ida;
static inline struct blk_flush_queue *blk_get_flush_queue(
struct request_queue *q, struct blk_mq_ctx *ctx)
{
- return q->fq;
+ struct blk_mq_hw_ctx *hctx;
+
+ if (!q->mq_ops)
+ return q->fq;
+
+ WARN_ON(!ctx);
+ hctx = q->mq_ops->map_queue(q, ctx->cpu);
+
+ return hctx->fq;

Kill the WARN_ON(), we'll know soon enough of this happens anyway.


--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/