|
@@ -541,9 +541,15 @@ void blk_mq_kick_requeue_list(struct request_queue *q)
|
|
|
}
|
|
|
EXPORT_SYMBOL(blk_mq_kick_requeue_list);
|
|
|
|
|
|
-struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag)
|
|
|
+struct request *blk_mq_tag_to_rq(struct blk_mq_hw_ctx *hctx, unsigned int tag)
|
|
|
{
|
|
|
- return tags->rqs[tag];
|
|
|
+ struct request_queue *q = hctx->queue;
|
|
|
+
|
|
|
+ if ((q->flush_rq->cmd_flags & REQ_FLUSH_SEQ) &&
|
|
|
+ q->flush_rq->tag == tag)
|
|
|
+ return q->flush_rq;
|
|
|
+
|
|
|
+ return hctx->tags->rqs[tag];
|
|
|
}
|
|
|
EXPORT_SYMBOL(blk_mq_tag_to_rq);
|
|
|
|
|
@@ -572,7 +578,7 @@ static void blk_mq_timeout_check(void *__data, unsigned long *free_tags)
|
|
|
if (tag >= hctx->tags->nr_tags)
|
|
|
break;
|
|
|
|
|
|
- rq = blk_mq_tag_to_rq(hctx->tags, tag++);
|
|
|
+ rq = blk_mq_tag_to_rq(hctx, tag++);
|
|
|
if (rq->q != hctx->queue)
|
|
|
continue;
|
|
|
if (!test_bit(REQ_ATOM_STARTED, &rq->atomic_flags))
|