All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russ Dill" <russ.dill@gmail.com>
To: "Vitaly Wool" <vwool@ru.mvista.com>
Cc: Josh Boyer <jwboyer@gmail.com>,
	Linux-MTD Mailing List <linux-mtd@lists.infradead.org>
Subject: Re: [RFC] read-only filesystem support for NAND flash devices
Date: Thu, 11 May 2006 12:06:55 -0700	[thread overview]
Message-ID: <f9d2a5e10605111206i4a5a425el17a28bb81989c6b6@mail.gmail.com> (raw)
In-Reply-To: <4461CC8C.6010105@ru.mvista.com>

> > Not quite the case.  You need bad block skipping, yes.  But NAND can
> > get bit flips in good blocks still.  How do you deal with that?  You
> > can't leave the block in that state forever because it will continue
> > to get bit flips and then your data will be unusable.
> Yep, I know about the issue. The recommended way to go here AFAIK is to
> mark the block as bad and copy its contents to a free one.
> However, this will make mapping a lot more complicated so I'd like to go
> another way, i. e. erasing and rewriting this very block, and if it
> wears out, cache the data read from it and schedule moving the data
> forward within the partition in a background. Does that make sense?

Then you'll run out of blocks. There are two seperate issues with NAND:

1) Bad blocks, NAND chips are shipped with a certain number of bad
blocks, during the chips life time, some of the other blocks will go
bad.

2) Reading from a sector degrades the data, but just a little tiny
bit. After several thousand reads, you may get a bit flip in your data
(which can be corrected by ECC). At this point, you do not have a bad
block, you just need to rewrite the data. You can't rewrite it to the
current block, because then a power loss would mean disaster. Also,
you can't mark the currently block as bad, because if you did, you
would decrease the usable life of your system (tons of good blocks
marked as bad)

So really,  for issue 2, you need some sort of free block list, so you
can reuse them. Which also means, you can expect the order of the
blocks on your filesystem to start to look more and more random as
time goes on. In other words, you also need some algorithm to find
which block is where.

Free block list? Bad block list? Tracking of block numbers? Sounds
like a full on FTL to me.

  parent reply	other threads:[~2006-05-11 19:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10  9:52 [RFC] read-only filesystem support for NAND flash devices Vitaly Wool
2006-05-10 11:00 ` Josh Boyer
2006-05-10 11:20   ` Vitaly Wool
2006-05-10 13:39     ` Jörn Engel
2006-05-10 20:11       ` Josh Boyer
2006-05-11 19:06     ` Russ Dill [this message]
2006-05-11 22:26       ` David Woodhouse
2006-05-11 23:26         ` Russ Dill
2006-05-11 23:34           ` Josh Boyer
2006-05-11 23:58             ` Russ Dill
2006-05-12  8:55           ` Vitaly Wool
2006-05-12  8:52       ` Vitaly Wool
2006-05-13 14:08         ` David Woodhouse
2006-05-10 17:04   ` Atsushi Nemoto
2006-05-10 17:20     ` Josh Boyer
2006-05-10 20:01       ` Jörn Engel
2006-05-11 14:23       ` Atsushi Nemoto

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=f9d2a5e10605111206i4a5a425el17a28bb81989c6b6@mail.gmail.com \
    --to=russ.dill@gmail.com \
    --cc=jwboyer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vwool@ru.mvista.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 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.