Lines Matching refs:flush_rq
220 static void flush_end_io(struct request *flush_rq, int error) in flush_end_io() argument
222 struct request_queue *q = flush_rq->q; in flush_end_io()
227 struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx); in flush_end_io()
234 hctx = q->mq_ops->map_queue(q, flush_rq->mq_ctx->cpu); in flush_end_io()
235 blk_mq_tag_set_rq(hctx, flush_rq->tag, fq->orig_rq); in flush_end_io()
236 flush_rq->tag = -1; in flush_end_io()
246 elv_completed_request(q, flush_rq); in flush_end_io()
295 struct request *flush_rq = fq->flush_rq; in blk_kick_flush() local
313 blk_rq_init(q, flush_rq); in blk_kick_flush()
323 flush_rq->mq_ctx = first_rq->mq_ctx; in blk_kick_flush()
324 flush_rq->tag = first_rq->tag; in blk_kick_flush()
328 blk_mq_tag_set_rq(hctx, first_rq->tag, flush_rq); in blk_kick_flush()
331 flush_rq->cmd_type = REQ_TYPE_FS; in blk_kick_flush()
332 flush_rq->cmd_flags = WRITE_FLUSH | REQ_FLUSH_SEQ; in blk_kick_flush()
333 flush_rq->rq_disk = first_rq->rq_disk; in blk_kick_flush()
334 flush_rq->end_io = flush_end_io; in blk_kick_flush()
336 return blk_flush_queue_rq(flush_rq, false); in blk_kick_flush()
518 fq->flush_rq = kzalloc_node(rq_sz, GFP_KERNEL, node); in blk_alloc_flush_queue()
519 if (!fq->flush_rq) in blk_alloc_flush_queue()
540 kfree(fq->flush_rq); in blk_free_flush_queue()