From: Michael Tokarev <mjt@tls.msk.ru>
To: Jeff Garzik <jeff@garzik.org>
Cc: "Mark Lord" <lkml@rtr.ca>, "Rogério Brito" <rbrito@ime.usp.br>,
linux-kernel@vger.kernel.org
Subject: Re: Quick question about libata and hdparm
Date: Sun, 19 Apr 2009 17:06:55 +0400 [thread overview]
Message-ID: <49EB21EF.3060600@msgid.tls.msk.ru> (raw)
In-Reply-To: <49EB1FB3.5000609@garzik.org>
Jeff Garzik wrote:
> Michael Tokarev wrote:
>> Mark Lord wrote:
>> []
>>> Nearly all of the hdparm flags work fine with libata and SATA/PATA
>>> drives.
>>> Among the *very few* that do not, are the -m and -d flags. -c will
>>> be working
>>> in the newest kernels, but not yet in most distro kernels.
>>>
>>> The -d flag is not permitted by libata, as the kernel prefers to
>>> completely
>>> dictate DMA / PIO, and it does do a rather good job of it.
>>
>> Well, the kernel does a good job here in *almost* all cases.
>> The problematic case is when a device has some bad/unreadable
>> blocks/sectors. When such a place occurs on read, libata
>> (or whatever it is) performs several retries, each time
>> using "less aggressive" settings - like reducing UDMA and
>> PIO mode till the lowest possible PIO/33. And the device
>> stays in that mode until reboot, even if the problematic
>> sector has been relocated. So it'd be nice to be able to
>> reset the mode back in such cases.
>
> Do you have a log?
Hmm. Just a week ago I were reading several bad disks - one
dying drive from a laptop with many bad blocks on it and several
scsi drives that were in a server room where an airconditioner
failed and ambient temp were as high as 78C. Ran that off an
rescue cd, without any permanent storage to save logs. It was
quite time-consuming process - I had to use ddrescue to recover
data, and I had to reboot several times to get the (sata) disk
to work in UDMA6 mode again (ddrescue saves state and resumes
from place it were stopped before). So no - I don't have logs
right now even if I saw it very recently.
> libata worries about speed changes for CRC errors and the like, not for
> media errors that involve sector relocation.
Maybe I were not clear enough. The relocation event were triggered
especially *after* failure to read the bad block(s). I tried to
read the bad blocks with ddrescue, during which drive returned
"media error" (in case of scsi drives) and - probably, but i'm
not sure - crc errors in case of sata, and libata (in case of
sata) reduced the mode the drive is working at and retried.
Later on I just wrote something to the problematic place to
trigger relocation and continued, but the drive (now reading
good portions) stays in PIO/33 mode anyway, which is slow and
I had to reboot to speed it up again.
So it seems there's no disagreement - the drive actually returned
something similar to CRC errors, and it has nothing to do with
sector relocation.
What I mean by mentioning relocated sectors is that the drive
stays in "lower" mode after - even if the problematic sector
is fixed already.
But this is not something you encounter 20 times a day, hopefully :)
/mjt
next prev parent reply other threads:[~2009-04-19 13:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-19 0:22 Quick question about libata and hdparm Rogério Brito
2009-04-19 6:31 ` Robert Hancock
2009-04-19 12:33 ` Mark Lord
2009-04-19 12:44 ` Michael Tokarev
2009-04-19 12:57 ` Jeff Garzik
2009-04-19 13:06 ` Michael Tokarev [this message]
2009-04-19 20:11 ` Rogério Brito
2009-04-19 21:27 ` Jeff Garzik
2009-04-20 17:35 ` Rogério Brito
2009-04-20 18:40 ` Alan Cox
2009-04-20 20:41 ` Rogério Brito
2009-04-20 21:16 ` Alan Cox
2009-04-20 20:31 ` Bartlomiej Zolnierkiewicz
2009-04-20 20:45 ` Rogério Brito
2009-04-20 21:19 ` Alan Cox
2009-04-20 22:57 ` Rogério Brito
2009-04-21 5:32 ` Rogério Brito
2009-04-21 12:59 ` Bartlomiej Zolnierkiewicz
2009-04-23 5:56 ` Rogério Brito
2009-04-23 21:31 ` Bartlomiej Zolnierkiewicz
2009-04-24 3:00 ` Rogério Brito
2009-05-01 9:18 ` Rogério Brito
2009-05-01 10:31 ` Alan Cox
2009-05-01 11:50 ` Rogério Brito
2009-05-01 13:16 ` Alan Cox
2009-05-01 14:19 ` Rogério Brito
2009-05-01 11:20 ` Bartlomiej Zolnierkiewicz
2009-05-11 18:34 ` Jeff Garzik
2009-04-19 20:03 ` Rogério Brito
2009-04-19 23:41 ` Mark Lord
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=49EB21EF.3060600@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
--cc=rbrito@ime.usp.br \
/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