Lines Matching refs:flush_rq

216 static enum rq_end_io_ret flush_end_io(struct request *flush_rq,  in flush_end_io()  argument
219 struct request_queue *q = flush_rq->q; in flush_end_io()
223 struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx); in flush_end_io()
228 if (!req_ref_put_and_test(flush_rq)) { in flush_end_io()
234 blk_account_io_flush(flush_rq); in flush_end_io()
240 WRITE_ONCE(flush_rq->state, MQ_RQ_IDLE); in flush_end_io()
247 flush_rq->tag = BLK_MQ_NO_TAG; in flush_end_io()
249 blk_mq_put_driver_tag(flush_rq); in flush_end_io()
250 flush_rq->internal_tag = BLK_MQ_NO_TAG; in flush_end_io()
296 struct request *flush_rq = fq->flush_rq; in blk_kick_flush() local
314 blk_rq_init(q, flush_rq); in blk_kick_flush()
324 flush_rq->mq_ctx = first_rq->mq_ctx; in blk_kick_flush()
325 flush_rq->mq_hctx = first_rq->mq_hctx; in blk_kick_flush()
328 flush_rq->tag = first_rq->tag; in blk_kick_flush()
335 flush_rq->rq_flags |= RQF_MQ_INFLIGHT; in blk_kick_flush()
337 flush_rq->internal_tag = first_rq->internal_tag; in blk_kick_flush()
339 flush_rq->cmd_flags = REQ_OP_FLUSH | REQ_PREFLUSH; in blk_kick_flush()
340 flush_rq->cmd_flags |= (flags & REQ_DRV) | (flags & REQ_FAILFAST_MASK); in blk_kick_flush()
341 flush_rq->rq_flags |= RQF_FLUSH_SEQ; in blk_kick_flush()
342 flush_rq->end_io = flush_end_io; in blk_kick_flush()
350 req_ref_set(flush_rq, 1); in blk_kick_flush()
353 list_add_tail(&flush_rq->queuelist, &q->flush_list); in blk_kick_flush()
499 fq->flush_rq = kzalloc_node(rq_sz, flags, node); in blk_alloc_flush_queue()
500 if (!fq->flush_rq) in blk_alloc_flush_queue()
520 kfree(fq->flush_rq); in blk_free_flush_queue()