public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Charles Manning <manningc2@actrix.gen.nz>
To: linux-mtd@lists.infradead.org, tglx@linutronix.de
Cc: Steven Hein <ssh@sgi.com>
Subject: Re: Erasing NAND bad blocks?
Date: Thu, 11 Aug 2005 08:08:15 +1200	[thread overview]
Message-ID: <200508110808.15354.manningc2@actrix.gen.nz> (raw)
In-Reply-To: <1123630395.21933.135.camel@tglx.tec.linutronix.de>

On Wednesday 10 August 2005 11:33, Thomas Gleixner wrote:
> On Tue, 2005-08-09 at 11:41 -0500, Steven Hein wrote:
> > (Yes, I do know that erasing NAND flash blocks that are marked bad
> > is a VERY BAD IDEA.....I'm asking the question regarding a
> > specific HW/SW debug situation.......)
> >
> > In the course of bringing up new hardware with NAND flash attached
> > I have had occasions where a software bug will cause a NAND-based
> > filesystem (such as YAFFS) to mark *all* of the blocks in a filesystem
> > as bad.  In the past, I have hacked the nand_erase() function to
> > allow erasing of bad blocks, then wrote a custom app to scan the OOB
> > data, doing a MEM_ERASE for blocks that had been marked bad by the FS.
> > Just wondering.....has anyone else
> > run into this situation, and is there a more graceful way of doing
> > this (i.e. without hacking the MTD NAND driver)?
>

As this comes around often wrt YAFFS1, I think there are two things that can 
be done in YAFFS to help address the issue:
1) Make the bad block marker used in YAFFS1 something that is easy to 
recognise (eg. 'Y' ) instead of 0x00. That way it should be easy to recognise 
yaffs -vs- factory marked bad blocks.
2) Add a config in yaffs to not do any bad block marking during board bring 
up.

-- CHarles

  reply	other threads:[~2005-08-10 20:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09 16:41 Erasing NAND bad blocks? Steven Hein
2005-08-09 23:33 ` Thomas Gleixner
2005-08-10 20:08   ` Charles Manning [this message]
2005-08-10 21:34     ` Sergei Sharonov
2005-08-10 21:38     ` Thomas Gleixner

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=200508110808.15354.manningc2@actrix.gen.nz \
    --to=manningc2@actrix.gen.nz \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ssh@sgi.com \
    --cc=tglx@linutronix.de \
    /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