]> git.hungrycats.org Git - linux/commitdiff
[PATCH] honor hard barrier in deadline
authorJens Axboe <axboe@suse.de>
Mon, 17 Mar 2003 00:20:50 +0000 (16:20 -0800)
committerJens Axboe <axboe@suse.de>
Mon, 17 Mar 2003 00:20:50 +0000 (16:20 -0800)
Previously, we only honored barriers wrt merging. Really honor them now,
move all pending requests to dispatch list and add the hard barrier at
the back.

drivers/block/deadline-iosched.c

index a107ec9682ce77aea4412a9e82ad2f74c0ff42d6..6735d56e2264fc8b0f3f995b3d2e98a218984a0f 100644 (file)
@@ -608,6 +608,12 @@ deadline_insert_request(request_queue_t *q, struct request *rq,
        if (unlikely(rq->flags & REQ_HARDBARRIER)) {
                DL_INVALIDATE_HASH(dd);
                q->last_merge = NULL;
+
+               while (deadline_dispatch_requests(dd))
+                       ;
+
+               list_add_tail(&rq->queuelist, dd->dispatch);
+               return;
        }
 
        if (unlikely(!blk_fs_request(rq))) {