From: Johannes Thumshirn <jthumshirn@suse.de>
To: Hannes Reinecke <hare@suse.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
James Bottomley <jbottomley@odin.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 5/5] scsi_error: do not escalate failed EH command
Date: Thu, 03 Dec 2015 10:15:12 +0100 [thread overview]
Message-ID: <1449134112.3311.10.camel@suse.de> (raw)
In-Reply-To: <1449127063-94512-6-git-send-email-hare@suse.de>
On Thu, 2015-12-03 at 08:17 +0100, Hannes Reinecke wrote:
> When a command is sent as part of the error handling there
> is not point whatsoever to start EH escalation when that
> command fails; we are _already_ in the error handler,
> and the escalation is about to commence anyway.
> So just call 'scsi_try_to_abort_cmd()' to abort outstanding
> commands and let the main EH routine handle the rest.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/scsi_error.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index cf47b81..0159498 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -870,15 +870,6 @@ static int scsi_try_to_abort_cmd(struct
> scsi_host_template *hostt,
> return hostt->eh_abort_handler(scmd);
> }
>
> -static void scsi_abort_eh_cmnd(struct scsi_cmnd *scmd)
> -{
> - if (scsi_try_to_abort_cmd(scmd->device->host->hostt, scmd) !=
> SUCCESS)
> - if (scsi_try_bus_device_reset(scmd) != SUCCESS)
> - if (scsi_try_target_reset(scmd) != SUCCESS)
> - if (scsi_try_bus_reset(scmd) != SUCCESS)
> - scsi_try_host_reset(scmd);
> -}
> -
> /**
> * scsi_eh_prep_cmnd - Save a scsi command info as part of error recovery
> * @scmd: SCSI command structure to hijack
> @@ -1063,7 +1054,7 @@ retry:
> break;
> }
> } else if (rtn != FAILED) {
> - scsi_abort_eh_cmnd(scmd);
> + scsi_try_to_abort_cmd(shost->hostt, scmd);
> rtn = FAILED;
> }
>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
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
prev parent reply other threads:[~2015-12-03 9:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 7:17 [PATCH 0/5] SCSI EH cleanup Hannes Reinecke
2015-12-03 7:17 ` [PATCH 1/5] libsas: allow async aborts Hannes Reinecke
2015-12-03 8:17 ` Johannes Thumshirn
2015-12-03 7:17 ` [PATCH 2/5] scsi: make scsi_eh_scmd_add() always succeed Hannes Reinecke
2015-12-03 9:07 ` Johannes Thumshirn
2015-12-03 16:51 ` Christoph Hellwig
2015-12-03 7:17 ` [PATCH 3/5] scsi: make eh_eflags persistent Hannes Reinecke
2015-12-03 9:08 ` Johannes Thumshirn
2015-12-03 16:55 ` Christoph Hellwig
2015-12-03 7:17 ` [PATCH 4/5] scsi: make asynchronous aborts mandatory Hannes Reinecke
2015-12-03 9:13 ` Johannes Thumshirn
2015-12-03 7:17 ` [PATCH 5/5] scsi_error: do not escalate failed EH command Hannes Reinecke
2015-12-03 9:15 ` Johannes Thumshirn [this message]
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=1449134112.3311.10.camel@suse.de \
--to=jthumshirn@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jbottomley@odin.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).