From: Mike Christie <michaelc@cs.wisc.edu>
To: James.Smart@Emulex.Com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/4] scsi: add transport host byte errors
Date: Thu, 15 Mar 2007 09:52:24 -0500 [thread overview]
Message-ID: <45F95DA8.6070108@cs.wisc.edu> (raw)
In-Reply-To: <45F9482B.4050100@emulex.com>
James Smart wrote:
>
>
> michaelc@cs.wisc.edu wrote:
>> fast_io_fail_tmo
>> iscsi: session recovery_tmo
>> fc: rport fast_io_fail_tmo
>>
>> The difference is that when the timer fires, for iscsi we unblock the
>> queue and fail commands in the blocked queue. FC just fails IO running
>> in the driver/fw/hw. The IO in the blocked queue sits there until
>> dev_loss_tmo.
>
> True - FC contacted the LLDD to terminate i/o, who has no notion of any io
> that has yet to be sent to it via queuecommand(). Blocked i/o sits until
> dev_loss_tmo, as that is when the sdev gets torn down. Perhaps a block
> layer call
> should be created, that the FC transport can call, to terminate the blocked
> queue. Thoughts ?
Do we want to fail IO that was sitting in the queue _and_ all new
incoming IO or just what was sitting in the queue?
The patches I sent, unplug the queues when failfast timer expires so
that is where the chk ready test for failfast comes in. When failfast
fires, the queue will be unplugged and we will hit the failfast test and
anything coming through will be failed.
Alternatively:
1. What about making the transport check ready test standard and adding
a transportt->check_ready callout which gets called before
scsi_dispatch_cmd calls the queuecommand?
2. Another option could be do add some code which does it a layer higher
at the scsi device level. The function would set the scsi_device state
to some value that would indicate the device is not ready and wants to
fail IO, then it would unplug the queue. The scsi_prep_fn would then
check for that state and fail IO. Or we could just set the state to an
existing value like offline and we would not have to modify and existing
state checks.
3. Or we could go one layer higher than that and add and set some block
layer bits. Unblock the queue and before the scsi_prep_fn is called the
block layer would check the state bit and fail IO.
4. Those would work if we want to fail IO that was queued and new
incoming IO. If we want to just fail IO that was queued, and queue IO
new incoming IO, then the block layer could offer a function which grabs
the queue lock, dequeued what was there and then fail each IO. scsi-ml
would then call that function as a helper. SCSI-ml again would not see
the IO here.
next prev parent reply other threads:[~2007-03-15 14:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 19:52 RFC: add transport host byte values and common failure behavior michaelc
2007-03-14 19:52 ` [PATCH 1/4] iscsi class, qla4xxx and libiscsi: export iscsi session state in sysfs michaelc
2007-03-14 19:52 ` [PATCH 2/4] scsi: add transport host byte errors michaelc
2007-03-14 19:52 ` [PATCH 3/4] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values michaelc
2007-03-14 19:52 ` [PATCH 4/4] fc class: use " michaelc
2007-03-14 20:11 ` [PATCH 2/4] scsi: add transport host byte errors Mike Christie
2007-03-14 21:14 ` Mike Christie
2007-03-15 13:41 ` [PATCH 4/4] fc class: use transport host byte values James Smart
2007-03-15 14:26 ` Mike Christie
2007-03-15 14:45 ` James Smart
2007-03-15 13:20 ` [PATCH 2/4] scsi: add transport host byte errors James Smart
2007-03-15 14:52 ` Mike Christie [this message]
2007-03-15 16:33 ` James Smart
2007-03-15 12:58 ` [PATCH 1/4] iscsi class, qla4xxx and libiscsi: export iscsi session state in sysfs James Smart
2007-03-15 14:20 ` Mike Christie
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=45F95DA8.6070108@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Smart@Emulex.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;
as well as URLs for NNTP newsgroup(s).