blk_mq_tag_to_rq() needs to be able to tell if it should return
the original request, or the flush request if we are doing a flush
sequence. Clear the flush tag when IO completes for a flush, since
that is what we are comparing against.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
if (q->mq_ops) {
spin_lock_irqsave(&q->mq_flush_lock, flags);
- q->flush_rq->cmd_flags = 0;
+ q->flush_rq->tag = -1;
}
running = &q->flush_queue[q->flush_running_idx];