From: Douglas Gilbert <dougg@torque.net>
To: John Treubig <jtreubig@hotmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: Error handling in LibATA
Date: Wed, 11 Jan 2006 09:22:13 +1000 [thread overview]
Message-ID: <43C441A5.6000205@torque.net> (raw)
In-Reply-To: <BAY101-F102837A76FADACF6F37DBBDF250@phx.gbl>
John Treubig wrote:
> I've been working on a problem with Promise 20269 PATA adapter under
> LibATA that if the drive has a write error or time-out, the application
> that is accessing the drive using SG should see some sort of error. My
> first problem was my system hung. After patching the IDE-IO.C, with a
> recognized patch, I have been able to keep my system from hanging. Now
> the only problem is the application gets no notification that the drive
> has been rendered inaccessible. (Test case is to run a system with my
> app going, and then pull the power from the drive. System log shows the
> errors, but nothing gets back to the app). The app does get
> notifications if I perform the same type of test on a drive attached to
> the motherboard secondary IDE adapter, so we know the app is correctly
> implemented.
>
> I've traced the errors down to the fact that the errors are caught in
> libata-core.c (ata_qc_timeout). I'd like to put a call in libata-core.c
> that would cause an error to be reflected back to the application. Can
> you suggest the function or method that would do this?
John,
SG_IO ioctl users would normally expect to see DRIVER_TIMEOUT
(plus a suggest mask) in sg_io_hdr::driver_status when a
mid level timeout goes off. So that needs to be "wired"
in libata (along with some other transport errors I suspect).
Here is an example of a timeout using the scsi_debug driver:
# modprobe scsi_debug ptype=9 delay=200000
# lsscsi -g
[0:0:0:0] comms Linux scsi_debug 0004 - /dev/sg0
# sg_start /dev/sg0
start stop unit: transport: Driver_status=0x06 [DRIVER_TIMEOUT, SUGGEST_OK]
START STOP UNIT command failed
Doug Gilbert
next prev parent reply other threads:[~2006-01-10 23:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 22:30 Error handling in LibATA John Treubig
2006-01-10 23:15 ` Alan Cox
2006-01-10 23:22 ` Douglas Gilbert [this message]
2006-01-11 2:07 ` Albert Lee
2006-01-11 15:30 John Treubig
2006-01-12 19:49 ` John Treubig
2006-01-13 5:45 ` Albert Lee
2006-01-13 15:41 ` John Treubig
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=43C441A5.6000205@torque.net \
--to=dougg@torque.net \
--cc=jtreubig@hotmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).