All of lore.kernel.org
 help / color / mirror / Atom feed
* How to test NAND bad blocks management?
@ 2019-06-24 20:00 JH
  2019-06-25  8:36 ` Richard Weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: JH @ 2019-06-24 20:00 UTC (permalink / raw)
  To: linux-mtd

Hi,

I learned from the list that the kernel is capable of handling NAND
bad blocks to use the mtd-utils "nandwrite" which I believe has
already included in kernel, is there any test problem to test the NAND
bad blocks management? What will be the symptoms when hitting the bad
blocks, segmentation, kernel error ...?

Thank you.

Kind regards,

- jupiter

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: How to test NAND bad blocks management?
  2019-06-24 20:00 How to test NAND bad blocks management? JH
@ 2019-06-25  8:36 ` Richard Weinberger
  2019-06-25 10:14   ` JH
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2019-06-25  8:36 UTC (permalink / raw)
  To: JH; +Cc: linux-mtd

On Mon, Jun 24, 2019 at 10:00 PM JH <jupiter.hce@gmail.com> wrote:
>
> Hi,
>
> I learned from the list that the kernel is capable of handling NAND
> bad blocks to use the mtd-utils "nandwrite" which I believe has
> already included in kernel, is there any test problem to test the NAND
> bad blocks management? What will be the symptoms when hitting the bad
> blocks, segmentation, kernel error ...?

If you try to operate on a known bad block, MTD will return -EIO.
Linux maintains a bad block table, it contains factory marked bad block
and block which got marked as bad during runtime.
If UBI finds a block which does not behave good, e.g. shows bitflips after
erasure, it will mark it as bad.

What exactly do you want to test?
You can set a bad block marker by hand, or enable UBI's bitflip emulation
via debugfs.

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: How to test NAND bad blocks management?
  2019-06-25  8:36 ` Richard Weinberger
@ 2019-06-25 10:14   ` JH
  0 siblings, 0 replies; 3+ messages in thread
From: JH @ 2019-06-25 10:14 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd

Thanks Richard,

On 6/25/19, Richard Weinberger <richard.weinberger@gmail.com> wrote:
> On Mon, Jun 24, 2019 at 10:00 PM JH <jupiter.hce@gmail.com> wrote:
>>
>> Hi,
>>
>> I learned from the list that the kernel is capable of handling NAND
>> bad blocks to use the mtd-utils "nandwrite" which I believe has
>> already included in kernel, is there any test problem to test the NAND
>> bad blocks management? What will be the symptoms when hitting the bad
>> blocks, segmentation, kernel error ...?
>
> If you try to operate on a known bad block, MTD will return -EIO.
> Linux maintains a bad block table, it contains factory marked bad block
> and block which got marked as bad during runtime.
> If UBI finds a block which does not behave good, e.g. shows bitflips after
> erasure, it will mark it as bad.
>
> What exactly do you want to test?

Well, it is an IoT device installed in remote sites, I've never used
NAND before, have no idea what will be the consequence when hitting
the bad blocks. Reliability is the major requirement for the device,
how can I know if kernel bad blocks management is functional or not?

> You can set a bad block marker by hand, or enable UBI's bitflip emulation
> via debugfs.

Thank you.

- j

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2019-06-25 10:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 20:00 How to test NAND bad blocks management? JH
2019-06-25  8:36 ` Richard Weinberger
2019-06-25 10:14   ` JH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.