On 12/7/18 9:41 AM, Bart Van Assche wrote: > On Fri, 2018-12-07 at 09:35 -0700, Jens Axboe wrote: >> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c >> index 29bfe8017a2d..9e5bda8800f8 100644 >> --- a/block/blk-mq-sched.c >> +++ b/block/blk-mq-sched.c >> @@ -377,6 +377,16 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head, >> >> WARN_ON(e && (rq->tag != -1)); >> >> + /* >> + * It's illegal to insert a request into the scheduler that has >> + * been through ->queue_rq(). Warn for that case, and use a bypass >> + * insert to be safe. >> + */ > > Shouldn't this refer to requests that have been prepared instead of requests > that have been through ->queue_rq()? I think this function is called for > requests that are requeued. Requeued requests have been through ->queue_rq() > but are unprepared before being requeued. If they are unprepared, RQF_DONTPREP should have been cleared. But needs testing and verification, which is exactly why I didn't want to bundle with the fix. I'll test it later today. -- Jens Axboe