lkml.org 
[lkml]   [2008]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Filesystem for block devices using flash storage?
From
On Sat, Oct 11, 2008 at 04:35:52PM +0200, Pavel Machek wrote:
> I don't think ext3 is safe w.r.t. whole eraseblocks disappearing. So
> if you write data 'nearby' root directory and power fails, bye bye
> filesystem, and journal will not help.
>
> Actually ext2 will at least detect damage...

I have never seen a flash device that worked that way. All the ones I
have seen have extra spare blocks and will copy an existing block to an
empty block changing the required bits while doing the copy to represent
the new data to be written. When done, they update the block map of the
device to point to the new block, then the old block is erase and added
to the spare block list.

This is also used as part of wear leveling, where better devices will
occationally take a rarely written block, move it to a more used spare
block, and then add the previously rarely used block to the spare list
for more use.

In cases of decent devices like this, ext3 works great. I have never
had a chunk of the filesystem disappear yet, although perhaps 2000
compact flash using units isn't a large enough data set to say much.

--
Len Sorensen


\
 
 \ /
  Last update: 2008-10-14 20:07    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site