dect
/
linux-2.6
Archived
13
0
Fork 0

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: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Jens Axboe 2007-01-19 11:27:47 +11:00 committed by Jens Axboe
parent cad9751642
commit 783660b2f6
1 changed files with 2 additions and 0 deletions

View File

@ -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) {