Re: [PATCH] as i/o hang with aacraid driver 2.6.0-test1

James Bottomley
2003-07-18T18:19:43Z

On Fri, 2003-07-18 at 12:45, Andrew Morton wrote:
> James Bottomley <James.Bottomley@steeleye.com> wrote:
> >
> > > Nick is probably on a plane by now. I sent Mark's original one-liner to
> > > Linus last night.
> >
> > That's not a fix, it only catches one out of the five requeue cases in
> > SCSI.
>
> Well yes, it's a bandaid. Anton was having hangs (sym2 I guess) and
> if fixed them, too.

Well, OK, but how about the attached bandaid which at least covers all
the queuing cases and confines the fix to the as code:

===== drivers/block/as-iosched.c 1.7 vs edited =====
--- 1.7/drivers/block/as-iosched.c Fri Jul 18 00:31:01 2003
+++ edited/drivers/block/as-iosched.c Fri Jul 18 13:28:21 2003
@@ -1306,6 +1306,15 @@
as_update_arq(ad, arq); /* keep state machine up to date */
}

+/*
+ * FIXME: HACK for AS requeue problems
+ */
+static void as_requeue_request(request_queue_t *q, struct request *rq)
+{
+ elv_completed_request(q, rq);
+ __elv_add_request(q, rq, 0, 0);
+}
+
static void
as_insert_request(request_queue_t *q, struct request *rq,
struct list_head *insert_here)
@@ -1821,6 +1830,7 @@
.elevator_next_req_fn = as_next_request,
.elevator_add_req_fn = as_insert_request,
.elevator_remove_req_fn = as_remove_request,
+ .elevator_requeue_req_fn = as_requeue_request,
.elevator_queue_empty_fn = as_queue_empty,
.elevator_completed_req_fn = as_completed_request,
.elevator_former_req_fn = as_former_request,

I'll send this one in, if everyone is OK with it.

It still fails in my test harness, but that's a much more severe test
than most things people will come across in the field.

James