Subject: Re: MTD devices in NetBSD
To: Pavel Cahyna <>
From: Terry Moore <>
List: tech-kern
Date: 03/23/2006 15:49:36
At 09:41 PM 3/23/2006 +0100, Pavel Cahyna wrote:
>On Tue, Mar 21, 2006 at 11:36:24PM -0800, Garrett D'Amore wrote:
> > MTD devices differ from regular "block" devices in some important aspects:
> >
> >    1. you have to erase a block before you write it (read-modify-write
> >       cycle)
> >    2. They need wear-leveling (writes "wear" the bits out) to prolong
> >       device life
> >    5. You may have to to do bad block management (some block devices
> >       have to do this)
> >    6. Generally, most filesystems designed for use with block devices
> >       won't work so well
>Aren't they similar to rewritable optical disks (CD-RWs and DVDs) in these

Yes, but because of lack of rotational latency sometimes people do 
things substantially differently.  Also, non-local error properties 
of NAND flash change things.  Erase blocks in NAND are some multiple 
of sectors.  Writing a sector in an erase block can cause other 
sectors in the erase block (that you've already written and verified) 
to grow errors.  As far as I know, the error properties of CD-RWs and 
DVDs are not as bad as this.

Even worse, next generation NAND flash may need "read levelling".

Basically, nobody would use NAND flash for data storage if it weren't 
so cost effective.