On 5/18/23 7:20 AM, Ming Lei wrote: > On Thu, May 18, 2023 at 03:06:32PM +0200, Christoph Hellwig wrote: >> On Thu, May 18, 2023 at 03:11:12PM +0800, Ming Lei wrote: >>>> - if ((rq->rq_flags & RQF_ELVPRIV) && e->type->ops.requeue_request) >>>> + if (e->type->ops.requeue_request) >>>> e->type->ops.requeue_request(rq); >>> >>> The above actually changes current behavior since RQF_ELVPRIV is only set >>> iff the following condition is true: >>> >>> (rq->rq_flags & RQF_ELV) && !op_is_flush(rq->cmd_flags) && >>> e->type->ops.prepare_request. >> >> It would require an I/O scheduler that implements .requeue_request but >> not .prepare_request, which doesn't exist and also is rather pointless as >> this .requeue_request method would never get called in the current code. >> >> So no, no behavior change in practice. > > Fair enough, just found that all three schedulers have implemented > e->type->ops.prepare_request. We should probably make this requirement explicit though, seems very fragile to depend on it just because it's the status quo. -- Jens Axboe