linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Bad block detection question
@ 2019-01-11 19:27 Zachary Graham
  2019-01-11 19:49 ` Zachary Graham
  0 siblings, 1 reply; 2+ messages in thread
From: Zachary Graham @ 2019-01-11 19:27 UTC (permalink / raw)
  To: linux-mtd

Hello,

I'm working with a Linux system that, for the most part, uses
UBI/UBIFS save for one small MTD that is used for boot-time
information. I'm currently working on our tool to manipulate data on
this disk and want to ensure it is robust to bad blocks.

Looking at the UBI code, the wear-leveling subsystem marks blocks as
bad after an erase failure. Which is what I've been doing so far.

At a high level, the program does the following when we determine a
write is needed:

1. Erase PEB
2a. If erase fails, mark as bad, move to next good PEB, continue.
2b. If erase succeeds, continue
3. Write data structure.

Looking at the nandtest.c I see two paths for marking bad blocks,
First is on a failed erase, the next is on a failed write. I'm curious
if it is recommended to also mark a block as bad an erase succeeds and
a subsequent write fails.

Regards,
ZG

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bad block detection question
  2019-01-11 19:27 Bad block detection question Zachary Graham
@ 2019-01-11 19:49 ` Zachary Graham
  0 siblings, 0 replies; 2+ messages in thread
From: Zachary Graham @ 2019-01-11 19:49 UTC (permalink / raw)
  To: linux-mtd

On Fri, Jan 11, 2019 at 11:27 AM Zachary Graham <zack.graham@gmail.com> wrote:
>
> Hello,
>
> I'm working with a Linux system that, for the most part, uses
> UBI/UBIFS save for one small MTD that is used for boot-time
> information. I'm currently working on our tool to manipulate data on
> this disk and want to ensure it is robust to bad blocks.
Since I wasn't explicit about this, this is a NAND flash device.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-11 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 19:27 Bad block detection question Zachary Graham
2019-01-11 19:49 ` Zachary Graham

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).