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

Jens Axboe
2003-07-19T08:11:45Z

On Fri, Jul 18 2003, James Bottomley wrote:
> On Fri, 2003-07-18 at 12:46, Mark Haverkamp wrote:
> > I'll try out your test harness on our hardware and see what happens.
>
> OK, I think I found the problem.
>
> Parts of the SCSI and block code don't distinguish between queueing and
> requeueing, so they trip over the exact same error.
>
> The (fairly invasive) fix is to add an extra parameter to
> blk_insert_request to tell it if this is a reinsertion or a new request
> (patch attached--against Jens' previous one).
>
> With this, I now get the AS ioscheduler to survive my tests.
>
> Incidentally, I'm not sure whether scsi_requeue_command() counts as a
> reinsertion. It's used to redo I/O after end_that_request_first() but
> before end_that_request_last().
>

> @@ -1550,11 +1551,15 @@
> /*
> * If command is tagged, release the tag
> */
> - if (blk_rq_tagged(rq))
> - blk_queue_end_tag(q, rq);
> + if(reinsert) {
> + blk_requeue_request(q, rq);
> + } else {
> + if (blk_rq_tagged(rq))
> + blk_queue_end_tag(q, rq);
>
> - drive_stat_acct(rq, rq->nr_sectors, 1);
> - __elv_add_request(q, rq, !at_head, 0);
> + drive_stat_acct(rq, rq->nr_sectors, 1);
> + __elv_add_request(q, rq, !at_head, 0);
> + }
> q->request_fn(q);
> spin_unlock_irqrestore(q->queue_lock, flags);

much better, looks good to me. Andrew, could you pull your hack and
apply mine + this one? If James doesn't beat me to it, I can make a
complete patch this afternoon.

--
Jens Axboe