cookie = request_to_qc_t(data.hctx, rq);
if (unlikely(is_flush_fua)) {
- blk_mq_put_ctx(data.ctx);
+ if (q->elevator)
+ goto elv_insert;
blk_mq_bio_to_request(rq, bio);
- blk_mq_get_driver_tag(rq, NULL, true);
blk_insert_flush(rq);
- blk_mq_run_hw_queue(data.hctx, true);
- goto done;
+ goto run_queue;
}
plug = current->plug;
}
if (q->elevator) {
+elv_insert:
blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio);
blk_mq_sched_insert_request(rq, false, true,
* latter allows for merging opportunities and more efficient
* dispatching.
*/
+run_queue:
blk_mq_run_hw_queue(data.hctx, !is_sync || is_flush_fua);
}
blk_mq_put_ctx(data.ctx);
cookie = request_to_qc_t(data.hctx, rq);
if (unlikely(is_flush_fua)) {
- blk_mq_put_ctx(data.ctx);
+ if (q->elevator)
+ goto elv_insert;
blk_mq_bio_to_request(rq, bio);
- blk_mq_get_driver_tag(rq, NULL, true);
blk_insert_flush(rq);
- blk_mq_run_hw_queue(data.hctx, true);
- goto done;
+ goto run_queue;
}
/*
}
if (q->elevator) {
+elv_insert:
blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio);
blk_mq_sched_insert_request(rq, false, true,
* latter allows for merging opportunities and more efficient
* dispatching.
*/
+run_queue:
blk_mq_run_hw_queue(data.hctx, !is_sync || is_flush_fua);
}