From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/5] scsi: make scsi_eh_scmd_add() always succeed
Date: Wed, 22 Jun 2016 15:28:45 +0200 [thread overview]
Message-ID: <20160622132845.GD6118@lst.de> (raw)
In-Reply-To: <1466415340-104465-3-git-send-email-hare@suse.de>
Agreed, I think trying to handle these sorts of errors isn't going
to be helpful, while the WARN_ON at least gives us a chance to
diagnose the issue if it ever happened.
> + WARN_ON(!shost->ehandler);
>
> spin_lock_irqsave(shost->host_lock, flags);
> + WARN_ON(shost->shost_state != SHOST_RUNNING &&
> + shost->shost_state != SHOST_CANCEL &&
> + shost->shost_state != SHOST_RECOVERY &&
> + shost->shost_state != SHOST_CANCEL_RECOVERY);
Use WARN_ON_ONCE to avoid repeated backtraces for the same condition.
> if (scsi_host_set_state(shost, SHOST_RECOVERY))
> - if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY))
> - goto out_unlock;
> + scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY);
No warn_on or early return here?
next prev parent reply other threads:[~2016-06-22 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 9:35 [PATCH 0/5] SCSI EH cleanup Hannes Reinecke
2016-06-20 9:35 ` [PATCH 1/5] libsas: allow async aborts Hannes Reinecke
2016-06-20 9:35 ` [PATCH 2/5] scsi: make scsi_eh_scmd_add() always succeed Hannes Reinecke
2016-06-22 13:28 ` Christoph Hellwig [this message]
2016-06-20 9:35 ` [PATCH 3/5] scsi: make eh_eflags persistent Hannes Reinecke
2016-06-22 13:33 ` Christoph Hellwig
2016-06-20 9:35 ` [PATCH 4/5] scsi: make asynchronous aborts mandatory Hannes Reinecke
2016-06-22 13:31 ` Christoph Hellwig
2016-06-20 9:35 ` [PATCH 5/5] scsi: Do not escalate failed EH command Hannes Reinecke
2016-06-22 13:36 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2015-12-03 7:17 [PATCH 0/5] SCSI EH cleanup Hannes Reinecke
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
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=20160622132845.GD6118@lst.de \
--to=hch@lst.de \
--cc=hare@suse.de \
--cc=james.bottomley@hansenpartnership.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).