Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=783660b2f60418144e168ab75a06786f9695fc70
Commit:     783660b2f60418144e168ab75a06786f9695fc70
Parent:     cad9751642b62cbb5f62feedc546b4f7890497d4
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 19 11:27:47 2007 +1100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 23:14:44 2007 +0100

    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 <[EMAIL PROTECTED]>
---
 block/elevator.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index d037623..25f6ef2 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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to