From: Ewan Milne <emilne@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: James Bottomley <jbottomley@parallels.com>,
Christoph Hellwig <hch@infradead.org>,
Bart vn Assche <bvanassche@acm.org>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly
Date: Fri, 13 Jun 2014 10:32:14 -0400 [thread overview]
Message-ID: <1402669934.3820.117.camel@localhost.localdomain> (raw)
In-Reply-To: <1402660906-74661-2-git-send-email-hare@suse.de>
On Fri, 2014-06-13 at 14:01 +0200, Hannes Reinecke wrote:
> Any callbacks in scsi_timeout_out() might return BLK_EH_RESET_TIMER,
> in which case we should leave the result alone and not set
> DID_TIME_OUT, as the command didn't actually timeout.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/scsi_error.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 47a1ffc..ff176a6 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -291,11 +291,11 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
> if (scsi_abort_command(scmd) == SUCCESS)
> return BLK_EH_NOT_HANDLED;
>
> - scmd->result |= DID_TIME_OUT << 16;
> -
> - if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
> - !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD)))
> - rtn = BLK_EH_HANDLED;
> + if (unlikely(rtn == BLK_EH_NOT_HANDLED)) {
> + scmd->result |= DID_TIME_OUT << 16;
> + if (!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))
> + rtn = BLK_EH_HANDLED;
> + }
>
> return rtn;
> }
See Paolo's patch series which includes:
[PATCH v3 4/6] scsi_error: fix invalid setting of host byte
I think your patch won't apply after his.
-Ewan
next prev parent reply other threads:[~2014-06-13 14:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 12:01 [PATCH 0/2] scsi command timeout fixes Hannes Reinecke
2014-06-13 12:01 ` [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly Hannes Reinecke
2014-06-13 14:32 ` Ewan Milne [this message]
2014-06-13 16:25 ` Christoph Hellwig
2014-06-13 12:01 ` [PATCH 2/2] scsi: Do not complete timed-out command Hannes Reinecke
2014-06-13 16:29 ` Christoph Hellwig
2014-06-16 18:23 ` Ewan Milne
2014-06-17 5:53 ` Hannes Reinecke
2014-06-19 14:43 ` Ewan Milne
2014-06-13 16:52 ` [PATCH 0/2] scsi command timeout fixes James Bottomley
2014-06-13 17:16 ` hch
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=1402669934.3820.117.camel@localhost.localdomain \
--to=emilne@redhat.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=jbottomley@parallels.com \
--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.