Re: [PATCH] Retry commands with UNIT_ATTENTION sense codes

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

 



On 05/04/2010 03:15 PM, Mike Christie wrote:
On 05/04/2010 11:26 AM, James Bottomley wrote:
The other patch is fine, but I don't think this is necessary. The
reason is that even returning SUCCESS here, we go straight into
scsi_finish_command() (which passes it up to the driver handler) and
then scsi_io_completion(). There's a catch for UNIT_ATTENTION in
scsi_io_completion

The request is sent as a REQ_TYPE_BLOCK_PC (this flag is set for the
request in sd_prepare_flush), and scsi_io_completion's blk_pc_request
check() that returns the request upwards is before the UNIT_ATTENTION

I was looking at the wrong source.

scsi_finish_command checks for REQ_TYPE_BLOCK_PC and sets good_bytes to scsi_bufflen, so when scsi_io_completion calls scsi_end_request, it fails the request before we can get to the UNIT_ATTENTION.




check one so we never hit the UNIT_ATTENTION check.
--
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

--
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