Re: [PATCH 1/2] SCSI: simplify scsi_io_completion()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 26 Nov 2008, James Bottomley wrote:

> On Mon, 2008-11-03 at 15:56 -0500, Alan Stern wrote:
> > This patch (as1142b) consolidates a lot of repetitious code in
> > scsi_io_completion().  It also fixes a few comments.  Most
> > importantly, however, it clearly distinguishes among the three sorts
> > of retries that can be done when a command fails to complete:

> OK, how about this as an update to the patch.  It corrects several
> things:
> 
>      1. For several error conditions, we would now print the sense twice
>         in slightly different ways, so unify the location of sense
>         printing.
>      2. I added more descriptions to actual failure conditions for
>         better debugging
>      3. according to spec, ABORTED_COMMAND is supposed to be retried
>         (except on DIF failure).  Our old behaviour of erroring it looks
>         to be a bug.
>      4. I'd prefer not to default initialise the action variable because
>         that ensures that every leg of the error handler has an
>         associated action and the compiler will warn if someone later
>         accidentally misses one or removes one.

This looks very good.  I'm pleased you didn't find anything actually 
wrong with the original patch aside from the ABORTED COMMAND handling. 

I was going to suggest adding a description to the ILLEGAL REQUEST
case.  But that case arises normally under various circumstances, so
perhaps it wouldn't be appropriate.  In fact, do you really want to
print out the result and sense data every time that case occurs?

> It also looks like 

... ?

Alan Stern

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux