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

James Bottomley
2003-07-17T15:29:11Z

On Thu, 2003-07-17 at 10:44, Mark Haverkamp wrote:
> I added Jens' and your patch and got this when I did a mkfs on an
> aacraid disk:

I don't get the crash, but it still hangs for me.

Just as a matter of interest, you should be able to simulate the problem
with almost any SCSI driver by adding artificial HOST/DEVICE busy
returns in queuecommand.

This is what I did in 53c700.c:

static int host_busy_cnt = 0;
static int device_busy_cnt = 0;

if((host_busy_cnt++)%1000 == 434) {
printk("53c700 RETURNING HOST BUSY, depth %d\n",
NCR_700_get_depth(SCp->device));
return SCSI_MLQUEUE_HOST_BUSY;
}

if((device_busy_cnt++) % 544 == 232) {
printk("53c700 RETURNING DEVICE BUSY, depth %d\n",
NCR_700_get_depth(SCp->device));
return SCSI_MLQUEUE_DEVICE_BUSY;
}

This is my usual method of testing our requeuing code (the depth is
important, because we take different actions depending on whether the
depth is zero or not---exercises the starvation code).

I believe this should work with scsi_debug even if you don't actually
have a SCSI setup.

James