Lines Matching refs:flush_rq
206 static void flush_end_io(struct request *flush_rq, blk_status_t error) in flush_end_io() argument
208 struct request_queue *q = flush_rq->q; in flush_end_io()
212 struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx); in flush_end_io()
218 if (!refcount_dec_and_test(&flush_rq->ref)) { in flush_end_io()
227 hctx = flush_rq->mq_hctx; in flush_end_io()
229 blk_mq_tag_set_rq(hctx, flush_rq->tag, fq->orig_rq); in flush_end_io()
230 flush_rq->tag = -1; in flush_end_io()
232 blk_mq_put_driver_tag(flush_rq); in flush_end_io()
233 flush_rq->internal_tag = -1; in flush_end_io()
273 struct request *flush_rq = fq->flush_rq; in blk_kick_flush() local
296 blk_rq_init(q, flush_rq); in blk_kick_flush()
306 flush_rq->mq_ctx = first_rq->mq_ctx; in blk_kick_flush()
307 flush_rq->mq_hctx = first_rq->mq_hctx; in blk_kick_flush()
311 flush_rq->tag = first_rq->tag; in blk_kick_flush()
312 blk_mq_tag_set_rq(flush_rq->mq_hctx, first_rq->tag, flush_rq); in blk_kick_flush()
314 flush_rq->internal_tag = first_rq->internal_tag; in blk_kick_flush()
317 flush_rq->cmd_flags = REQ_OP_FLUSH | REQ_PREFLUSH; in blk_kick_flush()
318 flush_rq->cmd_flags |= (flags & REQ_DRV) | (flags & REQ_FAILFAST_MASK); in blk_kick_flush()
319 flush_rq->rq_flags |= RQF_FLUSH_SEQ; in blk_kick_flush()
320 flush_rq->rq_disk = first_rq->rq_disk; in blk_kick_flush()
321 flush_rq->end_io = flush_end_io; in blk_kick_flush()
323 blk_flush_queue_rq(flush_rq, false); in blk_kick_flush()
487 fq->flush_rq = kzalloc_node(rq_sz, flags, node); in blk_alloc_flush_queue()
488 if (!fq->flush_rq) in blk_alloc_flush_queue()
509 kfree(fq->flush_rq); in blk_free_flush_queue()