Re: Linux 2.6.10-rc2 OOPS on boot with 3ware + reiserfs

From: James Bottomley
Date: Thu Nov 18 2004 - 14:33:50 EST


On Thu, 2004-11-18 at 13:10, Jens Axboe wrote:
> It is a double requeue. The SCSI path looks really messy (and buggy
> there). What happens is that the host queuecommand sets DID_ERROR and
> calls scsi_done() on the command, which may decide the commands need
> retrying and thus requeue it. Upon return from queuecommand, the SCSI
> layer initiates a requeue of the request because queuecommand returned
> 1. Double requeue, request list is now screwed.
>
> James, it looks like the queuecommand returns need an overhaul so it's
> clear who does what and when.

Hmm, I thought the Documentation/scsi/scsi_mid_low_api.txt was quite
clear on this:

* Command ownership. If the driver returns zero, it owns the
* command and must take responsibility for ensuring the 'done'
* callback is executed. Note: the driver may call done before
* returning zero, but after it has called done, it may not
* return any value other than zero. If the driver makes a
* non-zero return, it must not execute the command's done
* callback at any time.

The 3ware driver is clearly in violation by calling done and then
returning one.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/