From: Brian Norris <computersforpeace@gmail.com>
To: dedekind1@gmail.com
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Matthieu CASTET <matthieu.castet@parrot.com>
Subject: Re: bbt and bitflip
Date: Thu, 23 Jun 2011 09:36:32 -0700 [thread overview]
Message-ID: <BANLkTimwOp4uPfQ0udLDycor2MjotUxiHw@mail.gmail.com> (raw)
In-Reply-To: <1303460103.2757.48.camel@localhost>
Hello,
On Fri, Apr 22, 2011 at 1:15 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Thu, 2011-04-21 at 19:17 +0200, Matthieu CASTET wrote:
>> Here a quick and dirty patch to make them more robust.
>> Any comment are welcomed.
>
> Would be great if you could test it and submit a nice patch with proper
> commit message and Signed-off-by.
I am interested in Artem's comments on the robustness of flash-based
BBT (here, and more recently on
http://lists.infradead.org/pipermail/linux-mtd/2011-June/036557.html).
I recently have moved to using flash-based BBT (in-band, actually),
and it seemed like several NAND drivers use flash-based BBT as well.
Is it really that un-trustworthy?
So I guess I'm looking for areas of improvement. I see a few suggestions here:
"Also the pattern and version in oob isn't protected by ecc. They can
be corrupted."
I noticed this one recently. My hardware ECC actually *can* do ECC for
what little OOB is actually free, but I realized that the nand_base
code doesn't even try to check the ECC stats (in nand_do_read_oob())
whereas some similar code for nand_do_read_ops *does* check the ECC
stats. Is it fair to adapt the code from nand_do_read_ops to
nand_do_read_oob so that both check for ECC errors, just in case the
hardware supports it? Would this cause any API problems, if users
didn't expect OOB reads to return ECC error statuses? For now, this
would only have any effect if a driver replaces the chip->ecc.read_oob
function with something that performs ECC operations independently and
increments the ECC counters.
And speaking of BBT in OOB:
Anyone know why the flash-based ident pattern and version is
"traditionally" stored in OOB? It was quite recently that Sebastian
Andrzej Siewior added the NAND_USE_FLASH_BBT_NO_OOB flag (which is
slated to be renamed/replaced, FYI). It seems like ...NO_OOB is a
generally good (or at least better) idea. Then we wouldn't even have
to worry much about ECC in OOB.
"read_bbt which ignore ecc bit flip/error"
If I understand right, read_bbt just prints warning message on ECC
flips/errors and otherwise ignores them? Would Matthieu's "quick and
dirty" patch be an OK start for fixing this? (where in the absence of
a valid backup tableb, an ECC error causes a flash rescan and an ECC
bitflip causes an erase/rewrite "scrub"?)
"The bbt should be protected with CRC and if it gets corrupted we
should re-scan the flash and re-create it."
Wouldn't CRC just be a lesser replacement for proper ECC protection?
Or am I missing something?
Brian
next prev parent reply other threads:[~2011-06-23 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 13:40 bbt and bitflip Matthieu CASTET
2011-04-21 17:17 ` Matthieu CASTET
2011-04-22 8:14 ` Artem Bityutskiy
2011-04-22 8:15 ` Artem Bityutskiy
2011-06-23 16:36 ` Brian Norris [this message]
2011-06-24 19:55 ` Artem Bityutskiy
2011-06-24 20:36 ` Matthew L. Creech
2011-04-22 8:08 ` Artem Bityutskiy
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=BANLkTimwOp4uPfQ0udLDycor2MjotUxiHw@mail.gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthieu.castet@parrot.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