Skip to content

Commit dcd8376

Browse files
committed
Revert "blk-flush: Queue through IO scheduler when flush not required"
This reverts commit 1b2ff19. Jan writes: -- Thanks for report! After some investigation I found out we allocate elevator specific data in __get_request() only for non-flush requests. And this is actually required since the flush machinery uses the space in struct request for something else. Doh. So my patch is just wrong and not easy to fix since at the time __get_request() is called we are not sure whether the flush machinery will be used in the end. Jens, please revert 1b2ff19. Thanks! I'm somewhat surprised that you can reliably hit the race where flushing gets disabled for the device just while the request is in flight. But I guess during boot it makes some sense. -- So let's just revert it, we can fix the queue run manually after the fact. This race is rare enough that it didn't trigger in testing, it requires the specific disable-while-in-flight scenario to trigger.
1 parent 55ce0da commit dcd8376

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-flush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ void blk_insert_flush(struct request *rq)
422422
if (q->mq_ops) {
423423
blk_mq_insert_request(rq, false, false, true);
424424
} else
425-
q->elevator->type->ops.elevator_add_req_fn(q, rq);
425+
list_add_tail(&rq->queuelist, &q->queue_head);
426426
return;
427427
}
428428

0 commit comments

Comments
 (0)