public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: James Bottomley <jbottomley@parallels.com>,
	Christoph Hellwig <hch@infradead.org>,
	Ewan Milne <emilne@redhat.com>, Robert Elliott <elliott@hp.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/3] scsi: make scsi_eh_scmd_add() always succeed
Date: Tue, 4 Nov 2014 10:36:48 -0800	[thread overview]
Message-ID: <20141104183648.GA29621@infradead.org> (raw)
In-Reply-To: <1415103073-90276-2-git-send-email-hare@suse.de>

On Tue, Nov 04, 2014 at 01:11:11PM +0100, Hannes Reinecke wrote:
> BLK_EH_HANDLED does not work with scsi commands, as we need
> to release the associated buffers correctly.

Which particular error do you see?  The ->eh_timed_out routines can
return BLK_EH_HANDLED, and libata, iscsi and fc actually do, so we'll
need to fix these issues either way.

> And scsi_eh_scmd_add() currently only will fail if no
> error handler thread is started (which will never be the
> case) 

Yes.

> or if the state machine encounters an illegal transition.
> As state machine transitions don't have any real meaning
> we can also force setting of the new state and
> make scsi_dh_scmd_add() a void function.
> With that we'll never have to resort to return
> BLK_EH_HANDLED.

Which kind of transition did you see rejected?  Neither a CREATED or
DEL_(RECOVERY) state should be possible when invoking the error handler,
so I'd rather see asserts here than overriding the state machine.
te RECOVERY state from a RUNNING or existing RECOVERY state, which
leaves CREATED, CANCEL, DEL, CANCEL_RECOVERY or DEL_RECOVERY.


  reply	other threads:[~2014-11-04 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 12:11 [RFC PATCH 0/3] scsi: make asynchronous aborts mandatory Hannes Reinecke
2014-11-04 12:11 ` [PATCH 1/3] scsi: make scsi_eh_scmd_add() always succeed Hannes Reinecke
2014-11-04 18:36   ` Christoph Hellwig [this message]
2014-11-05  7:44     ` Hannes Reinecke
2014-11-04 12:11 ` [PATCH 2/3] scsi: make eh_eflags persistent Hannes Reinecke
2014-11-04 12:11 ` [PATCH 3/3] scsi: make asynchronous aborts mandatory Hannes Reinecke
2014-11-04 18:52   ` 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=20141104183648.GA29621@infradead.org \
    --to=hch@infradead.org \
    --cc=elliott@hp.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox