Skip to content

Commit 53d63e6

Browse files
author
Jens Axboe
committed
block: make the flush insertion use the tail of the dispatch list
It's not a preempt type request, in fact we have to insert it behind requests that do specify INSERT_FRONT. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
1 parent b710a48 commit 53d63e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-flush.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static bool blk_kick_flush(struct request_queue *q)
261261
q->flush_rq.end_io = flush_end_io;
262262

263263
q->flush_pending_idx ^= 1;
264-
__elv_add_request(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE);
264+
list_add_tail(&q->flush_rq.queuelist, &q->queue_head);
265265
return true;
266266
}
267267

@@ -312,7 +312,7 @@ void blk_insert_flush(struct request *rq)
312312
*/
313313
if ((policy & REQ_FSEQ_DATA) &&
314314
!(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
315-
list_add(&rq->queuelist, &q->queue_head);
315+
list_add_tail(&rq->queuelist, &q->queue_head);
316316
return;
317317
}
318318

0 commit comments

Comments
 (0)