From: Brian King <brking@linux.vnet.ibm.com>
To: Christof Schmitt <christof.schmitt@de.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: eh_abort_handler and calling scsi_done
Date: Tue, 24 Mar 2009 08:29:57 -0500 [thread overview]
Message-ID: <49C8E055.2060108@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090324114137.GA8616@schmichrtp.de.ibm.com>
Your assessment sounds correct to me. The other caveat to note is that
if for some reason in your eh_abort_handler you don't think the command
is still outstanding, you should return SUCCESS for this as well.
-Brian
Christof Schmitt wrote:
> I am investigating what is required from a LLD when SCSI commands time
> out and the SCSI EH calls the eh_abort_handler. The documentation in
> scsi_eh.txt states:
>
> <<scsi_eh_abort_cmds>>
>
> This action is taken for each timed out command.
> hostt->eh_abort_handler() is invoked for each scmd. The
> handler returns SUCCESS if it has succeeded to make LLDD and
> all related hardware forget about the scmd.
>
> From this and from looking at the code, i would conclude:
>
> 1) If the LLD returns FAILED from the eh_abort_handler, then the
> command is still allowed to be active in the LLD and the LLD can
> call scsi_done any time later (probably latest when the
> eh_host_reset_handler flushes everything that is still pending).
>
> 2) While the abort is pending, but before returning SUCCESS from
> eh_abort_handler, the LLD can still call scsi_done for the SCSI
> command to be aborted (the SCSI command might be returned with a
> status "aborted" if the abort succeeds, or "good" if it was
> completed just before the abort reached the storage system).
>
> Is this correct? Are there any more limitations a SCSI LLD has to be
> aware of?
>
> --
> Christof Schmitt
> --
> 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
--
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
next prev parent reply other threads:[~2009-03-24 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 11:41 eh_abort_handler and calling scsi_done Christof Schmitt
2009-03-24 13:29 ` Brian King [this message]
2009-03-24 14:34 ` Christof Schmitt
2009-03-24 17:46 ` Mike Anderson
2009-03-25 8:52 ` Christof Schmitt
2009-03-25 13:52 ` Brian King
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=49C8E055.2060108@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=christof.schmitt@de.ibm.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