Linux-mtd Archive mirror
 help / color / mirror / Atom feed
From: Daniil Stas <daniil.stas@posteo.net>
To: linux-mtd@lists.infradead.org
Subject: New bad blocks handling
Date: Thu,  9 May 2024 10:12:39 +0000	[thread overview]
Message-ID: <20240509131239.0cd206c8@g14> (raw)

Hi,
I have a question about handling of new bad blocks on a NAND flash that
may occur during it's lifetime.

As I understand, when writing new data to the flash I have to check for
erase or write operation errors and mark the blocks bad accordingly.

I see that nandwrite utility has -m option that does the marking of bad
blocks on write errors.
But on the spinand devices with bad blocks that I've seen personally,
the write operation doesn't return any errors when trying to write to
the bad block, only the erase operation does.
And flash_erase utility doesn't have an option similar to -m option of
nandwrite to automatically mark the bad blocks.

I also see that ubiformat utility does automatic bad block marking on
erase errors.

Shouldn't flash_erase utility has an option like this?
Or is there other way to make safe nand writes using mtd utils without
using UBI?

Thanks

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

                 reply	other threads:[~2024-05-09 10:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240509131239.0cd206c8@g14 \
    --to=daniil.stas@posteo.net \
    --cc=linux-mtd@lists.infradead.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 read-only IMAP folder(s) and NNTP newsgroup(s).