From: s ponnusa <foosaa@gmail.com>
To: Robert Hancock <hancockrwd@gmail.com>
Cc: Mark Lord <kernel@teksavvy.com>,
Greg Freemyer <greg.freemyer@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Jens Axboe <jens.axboe@oracle.com>,
linux-mm@kvack.org
Subject: Re: Linux kernel - Libata bad block error handling to user mode program
Date: Thu, 4 Mar 2010 21:17:56 -0500 [thread overview]
Message-ID: <f875e2fe1003041817u5d9f71calbcef5b0c5c63d8a0@mail.gmail.com> (raw)
In-Reply-To: <51f3faa71003041816j427c5072ydd16d6e5b13f1545@mail.gmail.com>
Yes, this log file was because of the read verification program. I
will send a fresh log file of write failure once I am back at work. I
did not verify the log before sending.
On Thu, Mar 4, 2010 at 9:16 PM, Robert Hancock <hancockrwd@gmail.com> wrote:
> On Thu, Mar 4, 2010 at 8:11 PM, s ponnusa <foosaa@gmail.com> wrote:
>>> There's nothing in libata which will cause the operation to eventually
>>> return success if the drive keeps failing it (at least there definitely
>>> should not be and I very much doubt there is). My guess is that somehow what
>>> you think should be happening is not what the drive is actually doing (maybe
>>> one of the retries you're seeing is actually succeeding in writing to the
>>> disk, or at least the drive reports it was).
>>>
>>> You haven't posted any of the actual kernel output you're seeing, so it's
>>> difficult to say exactly what's going on. However, attempting to scan for
>>> disk errors using writes seems like a flawed strategy. As several people
>>> have mentioned, drives can't necessarily detect errors on a write.
>>>
>>
>> The scenario involves lots of bad drives with the known bad sectors
>> locations. Take MHDD for example, it sends an ATA write command to one
>> of the bad sectors, the drive returns failure / timeout, it tries
>> again, the drive still says failure / timeout, program comes out and
>> says failure. If we are not checking the errors during write process,
>> and continue to reallocate the sector or retry the write again, what
>> happens after all the available sectors are remapped? I still could
>> not visualise it for some reasons.
>>
>> Consider this scenario:
>> My write program says write passed. But when I used another
>> verification program (replica of the erasure program but does only
>> read / verify) it is unable to read the data and returns failure. No
>> other program (for example a Windows based hex editor or DOS based
>> disk editor) is able to read the information from that particular
>> sector. So, obviously the data written by linux is corrupted and
>> cannot be read back by any other means. And the program which wrote
>> the data is unaware of the error that has happened at the lower level.
>> But the error log clearly has the issue caught but is trying to handle
>> differently.
>>
>> I've attached a part of sample dmesg log which was logged during the
>> grinding of bad sector operation and eventually the write passed.
>
> [ 7671.006928] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> [ 7671.006936] ata1.00: BMDMA stat 0x25
> [ 7671.006943] ata1.00: cmd c8/00:08:a8:56:75/00:00:00:00:00/e5 tag 0
> dma 4096 in
> [ 7671.006945] res 51/40:04:ac:56:75/10:02:05:00:00/e5 Emask
> 0x9 (media error)
> [ 7671.006949] ata1.00: status: { DRDY ERR }
> [ 7671.006951] ata1.00: error: { UNC }
> [ 7671.028606] ata1.00: configured for UDMA/100
> [ 7671.028617] ata1: EH complete
>
> Command C8 is a read that's failing. It looks like almost all of the
> failures in that log are from failed reads, I don't see any failed
> writes. From what I can see it sounds like the drive is apparently
> writing successfully but is unable to read the data back (the reads
> being due to read-modify-write operations being done or for some other
> reason).
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-03-05 2:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <f875e2fe1003032052p944f32ayfe9fe8cfbed056d4@mail.gmail.com>
2010-03-04 6:42 ` Linux kernel - Libata bad block error handling to user mode program Andrew Morton
2010-03-04 12:58 ` foo saa
2010-03-04 16:31 ` Mike Hayward
2010-03-04 18:12 ` s ponnusa
2010-03-05 0:42 ` Mike Hayward
2010-03-05 2:23 ` s ponnusa
2010-03-05 16:31 ` Mike Hayward
2010-03-05 6:01 ` Greg Freemyer
2010-03-05 13:04 ` Alan Cox
2010-03-04 16:37 ` Mike Hayward
2010-03-04 18:23 ` s ponnusa
2010-03-04 14:17 ` Greg Freemyer
2010-03-04 14:41 ` Mark Lord
2010-03-04 15:33 ` foo saa
2010-03-04 17:49 ` Mark Lord
2010-03-04 18:20 ` s ponnusa
2010-03-04 19:41 ` Greg Freemyer
2010-03-04 19:50 ` s ponnusa
2010-03-05 1:58 ` Robert Hancock
2010-03-05 2:11 ` s ponnusa
2010-03-05 2:16 ` Robert Hancock
2010-03-05 2:17 ` s ponnusa [this message]
2010-03-05 12:03 ` Alan Cox
2010-03-05 22:27 ` s ponnusa
2010-03-11 18:29 ` Greg Freemyer
2010-03-13 22:44 ` s ponnusa
2010-03-13 23:44 ` Robert Hancock
2010-03-14 0:12 ` s ponnusa
2010-03-14 5:06 ` Robert Hancock
2010-03-14 16:02 ` Mark Lord
2010-03-14 16:12 ` Greg Freemyer
2010-03-04 18:40 Kalra Ashish-B00888
-- strict thread matches above, loose matches on Subject: below --
2010-03-04 18:41 Kalra Ashish-B00888
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=f875e2fe1003041817u5d9f71calbcef5b0c5c63d8a0@mail.gmail.com \
--to=foosaa@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=greg.freemyer@gmail.com \
--cc=hancockrwd@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=kernel@teksavvy.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).