diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-01-19 01:27:47 +0100 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-02-11 23:14:44 +0100 |
commit | 783660b2f60418144e168ab75a06786f9695fc70 (patch) | |
tree | c25135f978bb2b400852b8aa27458a6d1649e999 /block | |
parent | elevator: abstract out the activate and deactivate functions (diff) | |
download | linux-783660b2f60418144e168ab75a06786f9695fc70.tar.xz linux-783660b2f60418144e168ab75a06786f9695fc70.zip |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c index d03762399147..25f6ef28e3bb 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -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) { |