Skip to content

Commit

Permalink
block: make the flush insertion use the tail of the dispatch list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Apr 5, 2011
1 parent b710a48 commit 53d63e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static bool blk_kick_flush(struct request_queue *q)
q->flush_rq.end_io = flush_end_io;

q->flush_pending_idx ^= 1;
__elv_add_request(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE);
list_add_tail(&q->flush_rq.queuelist, &q->queue_head);
return true;
}

Expand Down Expand Up @@ -312,7 +312,7 @@ void blk_insert_flush(struct request *rq)
*/
if ((policy & REQ_FSEQ_DATA) &&
!(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
list_add(&rq->queuelist, &q->queue_head);
list_add_tail(&rq->queuelist, &q->queue_head);
return;
}

Expand Down

0 comments on commit 53d63e6

Please sign in to comment.