Lines Matching refs:flush_rq
215 static void flush_end_io(struct request *flush_rq, blk_status_t error) in flush_end_io() argument
217 struct request_queue *q = flush_rq->q; in flush_end_io()
221 struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx); in flush_end_io()
226 if (!refcount_dec_and_test(&flush_rq->ref)) { in flush_end_io()
232 blk_account_io_flush(flush_rq); in flush_end_io()
238 WRITE_ONCE(flush_rq->state, MQ_RQ_IDLE); in flush_end_io()
245 flush_rq->tag = BLK_MQ_NO_TAG; in flush_end_io()
247 blk_mq_put_driver_tag(flush_rq); in flush_end_io()
248 flush_rq->internal_tag = BLK_MQ_NO_TAG; in flush_end_io()
292 struct request *flush_rq = fq->flush_rq; in blk_kick_flush() local
310 blk_rq_init(q, flush_rq); in blk_kick_flush()
320 flush_rq->mq_ctx = first_rq->mq_ctx; in blk_kick_flush()
321 flush_rq->mq_hctx = first_rq->mq_hctx; in blk_kick_flush()
324 flush_rq->tag = first_rq->tag; in blk_kick_flush()
331 flush_rq->rq_flags |= RQF_MQ_INFLIGHT; in blk_kick_flush()
333 flush_rq->internal_tag = first_rq->internal_tag; in blk_kick_flush()
335 flush_rq->cmd_flags = REQ_OP_FLUSH | REQ_PREFLUSH; in blk_kick_flush()
336 flush_rq->cmd_flags |= (flags & REQ_DRV) | (flags & REQ_FAILFAST_MASK); in blk_kick_flush()
337 flush_rq->rq_flags |= RQF_FLUSH_SEQ; in blk_kick_flush()
338 flush_rq->rq_disk = first_rq->rq_disk; in blk_kick_flush()
339 flush_rq->end_io = flush_end_io; in blk_kick_flush()
347 refcount_set(&flush_rq->ref, 1); in blk_kick_flush()
349 blk_flush_queue_rq(flush_rq, false); in blk_kick_flush()
483 fq->flush_rq = kzalloc_node(rq_sz, flags, node); in blk_alloc_flush_queue()
484 if (!fq->flush_rq) in blk_alloc_flush_queue()
509 kfree(fq->flush_rq); in blk_free_flush_queue()