From: Nick Piggin The AS requeue is a correct requeue implementation for AS, which just happens to side-step a bug (inherited from deadline) which the scsi requeue code hits. I'm waiting for Jens before fixing the bug properly in both schedulers. This patch works around the same problem with deadline. Steve said his first round of tests couldn't repeat the oops. Maybe one of you would like to pick this up, but its a rare bug and the hack would get pulled out again in a couple of weeks when Jens returns. drivers/block/deadline-iosched.c | 13 +++++++++++++ 1 files changed, 13 insertions(+) diff -puN drivers/block/deadline-iosched.c~deadline-requeue-workaround drivers/block/deadline-iosched.c --- 25/drivers/block/deadline-iosched.c~deadline-requeue-workaround 2003-08-14 23:26:17.000000000 -0700 +++ 25-akpm/drivers/block/deadline-iosched.c 2003-08-14 23:26:17.000000000 -0700 @@ -308,6 +308,18 @@ deadline_add_request(struct deadline_dat } /* + * TODO: requeue hack to work around failings in deadline_insert_request + * when a requeues want to push a blk_fs_request on to the head of the list. + * + * Must also be fixed in as-iosched.c - probably the same way! + */ +static void deadline_requeue_request(request_queue_t *q, struct request *rq) +{ + struct deadline_data *dd = q->elevator.elevator_data; + list_add_tail(&rq->queuelist, dd->dispatch); +} + +/* * remove rq from rbtree, fifo, and hash */ static void deadline_remove_request(request_queue_t *q, struct request *rq) @@ -929,6 +941,7 @@ elevator_t iosched_deadline = { .elevator_merged_fn = deadline_merged_request, .elevator_merge_req_fn = deadline_merged_requests, .elevator_next_req_fn = deadline_next_request, + .elevator_requeue_req_fn = deadline_requeue_request, .elevator_add_req_fn = deadline_insert_request, .elevator_remove_req_fn = deadline_remove_request, .elevator_queue_empty_fn = deadline_queue_empty, _