From: James Smart <James.Smart@Emulex.Com>
To: Erez Zilber <erezz@voltaire.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Receiving a SCSI response after abort task was sent
Date: Sun, 02 Jul 2006 11:54:26 -0400 [thread overview]
Message-ID: <44A7EC32.1010904@emulex.com> (raw)
In-Reply-To: <44A7A547.6080709@voltaire.com>
Erez Zilber wrote:
> Hi,
>
> I have a question about aborting tasks: when an initiator sends "abort
> task" to the target, it is possible that the target will send a SCSI
> response for the same task before receiving the abort task (I guess that
> the target won't send a task management response for the abort task).
Yes - as the 2 may be in flight simultaneously (depending on the SCSI
transport type). And yes, the target will respond to the task management
response, but may tell you it failed or that the task didn't exist.
> What should the initiator do with the SCSI response? Is the host that
> issued the abort task willing to receive a SCSI response for that task?
> Is it willing to receive only a task management response for the abort
> task?
Well, this is macrocosm of other race conditions that can still exist
within the software/driver/adapter. The recommended approach has been:
if the i/o completes (good or bad) before the task mgmt response,
complete it with whatever response is appropriate (usually ignoring the
fact that there was a request to abort it) - as you are reporting the
true state of the io - which means if it changed media, you have a
chance of knowing that above. In the abort handler, if the tmf completes
indicating it couldn't find the i/o and the driver no longer has the i/o
in it's queues, you would just return "success" to the request (an abort
of nothing is successful :). Keep in mind that this has another
implication that should be maintained - that of status from the i/o being
returned prior to status of the tmf - whether the status is returned from
an adapter, or by the driver.
-- james s
prev parent reply other threads:[~2006-07-02 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-02 10:51 Receiving a SCSI response after abort task was sent Erez Zilber
2006-07-02 13:22 ` Ishai Rabinovitz
2006-07-02 13:47 ` Erez Zilber
2006-07-02 15:14 ` Ishai Rabinovitz
2006-07-02 15:54 ` James Smart [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=44A7EC32.1010904@emulex.com \
--to=james.smart@emulex.com \
--cc=erezz@voltaire.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