From: Mike Christie <michaelc@cs.wisc.edu>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Retry commands with UNIT_ATTENTION sense codes
Date: Tue, 04 May 2010 15:27:12 -0500 [thread overview]
Message-ID: <4BE08320.40206@cs.wisc.edu> (raw)
In-Reply-To: <4BE0804D.1030406@cs.wisc.edu>
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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-04 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 14:48 [PATCH] Retry commands with UNIT_ATTENTION sense codes Hannes Reinecke
2010-05-04 16:26 ` James Bottomley
2010-05-04 20:15 ` Mike Christie
2010-05-04 20:27 ` Mike Christie [this message]
2010-05-04 20:30 ` James Bottomley
2010-05-04 20:51 ` James Bottomley
2010-05-05 6:26 ` Hannes Reinecke
2010-05-05 13:19 ` James Bottomley
2010-05-05 13:28 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE08320.40206@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.