From: James Smart <James.Smart@Emulex.Com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/4] scsi: add transport host byte errors
Date: Thu, 15 Mar 2007 12:33:01 -0400 [thread overview]
Message-ID: <45F9753D.5040900@emulex.com> (raw)
In-Reply-To: <45F95DA8.6070108@cs.wisc.edu>
So my position changes a little now that you pointed out that you
release the request queue when fastfail kicks in.
Mike Christie wrote:
> 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?
I believe all i/o - so that the upper layer sees everything occurring
on each state change and can choose accordingly.
>
> 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?
I like the idea, as I hated having to add this snippet to each driver.
The other place we had to use it was in slave_alloc(), so doing the same
thing there would be great.
> 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.
>
Yep, and likely a better decision long term (though more work) as it's
storage transport agnostic. The "other layer" guys can answer better on
this one. I would think we still have to keep the chkready()s as there will
always be race conditions.
> 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.
True - but this is a new and different abort routine from the one today
that expects to kick in on timeout. We purposely stopped the eh handler
from aborting a command while you had connectivity lost. So, it would be
a bad idea to go down this path.
-- james s
next prev parent reply other threads:[~2007-03-15 16:33 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
2007-03-15 16:33 ` James Smart [this message]
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=45F9753D.5040900@emulex.com \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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).