On Wed, May 24, 2023 at 11:22:00AM -0700, Bart Van Assche wrote: >>> static inline void blk_mq_sched_requeue_request(struct request *rq) >>> { >>> - if (rq->rq_flags & RQF_USE_SCHED) { >>> - struct request_queue *q = rq->q; >>> - struct elevator_queue *e = q->elevator; >>> - >>> - if (e->type->ops.requeue_request) >>> - e->type->ops.requeue_request(rq); >>> - } >>> + if (rq->rq_flags & RQF_USE_SCHED) >>> + rq->rq_flags |= RQF_REQUEUED; >>> } >> >> I'd drop this helper function if we go down this way. But maybe >> we might just want to keep the method. > > My understanding is that every .requeue_request() call is followed by a > .insert_requests() call and hence that we don't need the .requeue_request() > method anymore if the RQF_REQUEUED flag would be introduced? Yes, but at the same time RQF_REQUEUED no creates global state instead of just in a callchain. That's why originally suggest a flag to ->insert_requests instead of leaving state on every request. > > Thanks, > > Bart. ---end quoted text---