linux-2.6-npiggin/drivers/block/as-iosched.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff -puN drivers/block/as-iosched.c~as-oops-fix drivers/block/as-iosched.c --- linux-2.6/drivers/block/as-iosched.c~as-oops-fix 2003-09-20 11:13:26.000000000 +1000 +++ linux-2.6-npiggin/drivers/block/as-iosched.c 2003-09-20 11:22:55.000000000 +1000 @@ -1303,7 +1303,7 @@ static struct request *as_next_request(r * Add arq to a list behind alias */ static inline void -as_add_aliased_request(struct as_rq *arq, struct as_rq *alias) +as_add_aliased_request(struct as_data *ad, struct as_rq *arq, struct as_rq *alias) { /* * Another request with the same start sector on the rbtree. @@ -1312,6 +1312,11 @@ as_add_aliased_request(struct as_rq *arq */ list_add_tail(&arq->request->queuelist, &alias->request->queuelist); + /* + * Don't want to have to handle merges. + */ + as_remove_merge_hints(ad->q, arq); + } /* @@ -1353,7 +1358,7 @@ static void as_add_request(struct as_dat as_update_arq(ad, arq); /* keep state machine up to date */ } else { - as_add_aliased_request(arq, alias); + as_add_aliased_request(ad, arq, alias); /* * have we been anticipating this request? * or does it come from the same process as the one we are @@ -1553,8 +1558,10 @@ static void as_merged_request(request_qu * currently don't bother. Ditto the next function. */ as_del_arq_rb(ad, arq); - if ((alias = as_add_arq_rb(ad, arq)) ) - as_add_aliased_request(arq, alias); + if ((alias = as_add_arq_rb(ad, arq)) ) { + list_del_init(&arq->fifo); + as_add_aliased_request(ad, arq, alias); + } /* * Note! At this stage of this and the next function, our next * request may not be optimal - eg the request may have "grown" @@ -1586,8 +1593,10 @@ as_merged_requests(request_queue_t *q, s if (rq_rb_key(req) != arq->rb_key) { struct as_rq *alias; as_del_arq_rb(ad, arq); - if ((alias = as_add_arq_rb(ad, arq)) ) - as_add_aliased_request(arq, alias); + if ((alias = as_add_arq_rb(ad, arq)) ) { + list_del_init(&arq->fifo); + as_add_aliased_request(ad, arq, alias); + } } /* _