On 4/12/23 16:14, Damien Le Moal wrote: > On 4/12/23 14:32, Christoph Hellwig wrote: >> blk_mq_sched_insert_request is the main request insert helper and not >> directly I/O scheduler related. Move blk_mq_sched_insert_request to >> blk-mq.c, rename it to blk_mq_insert_request and mark it static. >> >> Signed-off-by: Christoph Hellwig <hch@xxxxxx> >> Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx> > > [...] > >> -void blk_mq_sched_insert_request(struct request *rq, bool at_head, >> - bool run_queue, bool async) >> -{ >> - struct request_queue *q = rq->q; >> - struct elevator_queue *e = q->elevator; >> - struct blk_mq_ctx *ctx = rq->mq_ctx; >> - struct blk_mq_hw_ctx *hctx = rq->mq_hctx; >> - >> - WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG)); >> - >> - if (blk_mq_sched_bypass_insert(hctx, rq)) { > > Nit: given the super confusing name that blk_mq_sched_bypass_insert() has, > replacing the above if with: > > if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq)) > > with the comment above it would make things even more readable I think. Ignore. Just saw you reworked this in patch 10. > > Otherwise looks good. > > Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx> > >