Commit 783660b2 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

elevator: don't sort reads between writes

Don't allow elv_dispatch_sort() to mix reads and writes together,
it's rarely a good idea.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent cad97516
......@@ -413,6 +413,8 @@ void elv_dispatch_sort(request_queue_t *q, struct request *rq)
list_for_each_prev(entry, &q->queue_head) {
struct request *pos = list_entry_rq(entry);
if (rq_data_dir(rq) != rq_data_dir(pos))
break;
if (pos->cmd_flags & (REQ_SOFTBARRIER|REQ_HARDBARRIER|REQ_STARTED))
break;
if (rq->sector >= boundary) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment