Subject: Re: followup to ATA flash newfs problem (WAS: newfs problem: "cg 0: bad magic number")
To: David Laight <david@l8s.co.uk>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: tech-kern
Date: 07/12/2002 09:58:52
On Fri, Jul 12, 2002 at 12:30:50AM +0100, David Laight wrote:
> > > I don't know about other CF manufacturers, but without wear-level balancing,
> > > their cards would die pretty soon when used with msdosfs, for example.
> 
> Not necessarily!  I read an old document from AMD that said that they
> 'guaranteed' 10 years retention on the sectors that had been written 10^6
> (or whatever the quated limit is) times.  It then pointed out that you
> typically don't need that much retention on the sectors you are writing
> frequently.

I've got some SanDisk reference manual which says that the FLASH chips used
in the CF cards (of that time) were specified for 10000 program/erase cycles
and to make the CF card allow for more than 10000 writes, the firmware did
wear-level balancing.  I don't know if this is the case today - FLASH chips
are getting better, but the largest capacity ones still are specified for
less prg/era cycles than the smaller ones.

The SanDisk cards also have error correction information for every disk
block, so they can probably allow for some amount of FLASH errors without
failing.

> OTOH if the filesystem issued 'sector erase' commands to the CF
> when a sector was no longer required, then the CF firmware would
> have a better chance at doing writes without having to do an
> expensive erase cycle.

The current SanDisk manual says the "Write Without Erase" command has
been changed to erase the sectors before write, so the "Erase Sectors"
command is now useless.

  -jm