From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Luben Tuikov <luben_tuikov@adaptec.com>,
Albert Lee <albertcc@tw.ibm.com>,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
Doug Maxey <dwm@maxeymade.com>
Subject: Re: [RFC] libata new EH document
Date: Thu, 1 Sep 2005 11:42:53 +0900 [thread overview]
Message-ID: <20050901024253.GA1648@htj.dyndns.org> (raw)
In-Reply-To: <431665D9.7010500@pobox.com>
Hello, Jeff.
On Wed, Aug 31, 2005 at 10:22:17PM -0400, Jeff Garzik wrote:
> Tejun Heo wrote:
> > IMHO, it's a good idea to maintain one qc to one ATA/ATAPI command
> >mapping as long as possible. And, in the suggested framework, it's
> >guaranteed that no other command can come inbetween CHECK_SENSE and
> >REQUEST_SENSE.
> >
> > Requesting sense from EH, calling scsi_decide_disposition() on the
> >sense and following the verdict should achieve the same effect as
> >emulating autosense. Is there any compelling reason to break one qc to
> >one command mapping?
>
>
> Yes, you should have one qc <-> one ATA/ATAPI command. That's why, in
> the NCQ scenario, I wanted to make sure that one qc was always reserved
> for error handling: REQUEST SENSE or READ LOG EXT, most importantly.
Having an extra (as opposed to reserved) EH qc doesn't break one qc
<-> one command mapping.
a. All EH commands are non-NCQ.
b. Inside EH, no other command is allowed.
So, we can allocate a qc which does not have a corresponding NCQ tag.
This qc will never be used for normal commands. It's used only for
internal commands when no other qc can be active.
If we don't have an extra qc for EH, as non-NCQ devices have only one
qc, we should either,
a. Rewrite failed qc to issue recovery command
b. Complete failed qc and issue recovery command
Both are not too attractive, IMHO.
I currently don't understand very well why you don't like extra qc
approach. Can you please elaborate?
>
> For SAT layer MODE SELECT translations, that implies multiple calls to
> qc_new/qc_issue/qc_complete before completing the overall SCSI command.
> The same for handling sata_sil mod15write: I am beginning to feel
> like the mod15write workaround might be best implemented in a manner
> that caused libata-scsi (not sata_sil) to create/issue/complete multiple
> ATA commands.
That's what I've done for multi-qc SCSI cmd translation patch I've
posted the other day, and I think it would be really neat to do
similar thing for m15w. However, to do so, we'll need some callbacks
at libata scsi/core layers (say, driver-overridable command
translation callbacks?) at the very least and I'm not sure about
adding those just for m15w.
> The only problem you run into is that a qc may be active during EH, when
> you need another qc. So avoiding recursive details becomes an issue.
I guess this means the same thing I've described above about non-NCQ
devices, right?
Thanks.
--
tejun
next prev parent reply other threads:[~2005-09-01 2:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-29 6:11 [RFC] libata new EH document Tejun Heo
2005-08-29 6:13 ` Tejun Heo
2005-08-30 9:10 ` Albert Lee
2005-08-30 10:26 ` Tejun Heo
2005-08-30 14:32 ` Luben Tuikov
2005-09-01 1:17 ` Tejun Heo
2005-09-01 2:22 ` Jeff Garzik
2005-09-01 2:42 ` Tejun Heo [this message]
2005-09-01 3:33 ` Luben Tuikov
2005-09-01 3:30 ` Luben Tuikov
2005-09-01 3:44 ` Tejun Heo
2005-09-01 4:38 ` Luben Tuikov
2005-09-01 5:44 ` Tejun Heo
2005-09-01 5:54 ` Jeff Garzik
2005-09-01 13:24 ` James Bottomley
2005-09-01 21:40 ` Luben Tuikov
2005-09-01 21:46 ` Jeff Garzik
2005-09-01 22:09 ` Luben Tuikov
2005-09-01 22:27 ` Jeff Garzik
2005-09-01 23:17 ` Luben Tuikov
2005-09-02 7:09 ` Stefan Richter
2005-09-01 22:22 ` Luben Tuikov
2005-09-01 22:31 ` Jeff Garzik
2005-09-01 21:55 ` James Bottomley
2005-09-01 22:07 ` Luben Tuikov
2005-09-01 22:23 ` James Bottomley
2005-09-01 22:36 ` Luben Tuikov
2005-09-01 23:01 ` James Bottomley
2005-09-01 23:03 ` Luben Tuikov
2005-09-01 23:27 ` Luben Tuikov
2005-09-01 2:22 ` Jeff Garzik
2005-08-30 14:27 ` James Bottomley
2005-09-07 8:25 ` Jeff Garzik
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=20050901024253.GA1648@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=albertcc@tw.ibm.com \
--cc=dwm@maxeymade.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=luben_tuikov@adaptec.com \
/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).