Re: ext2 on flash memory

From: Juergen Beisert
Date: Mon Jun 11 2007 - 15:45:50 EST


On Monday 11 June 2007 19:42, DervishD wrote:
> I just was curious about the issue and I was asking to know if
> anybody had tried this.

Think about compact flash devices. They also using some kind of flash memory
and also doing wear leveling. And I think they are not only used with
FAT16/32! If they run with different filesystems, then your pendrive stick
will also. Only the interface is different.

> I know about cheap pendrives that you cannot format even with FAT32, only
> with FAT16.

I'm not sure if the price was the reason that they failed with different
filesystems. Some kind of wear leveling tries to guess which blocks of the
filesystem are in use and which are unused (to avoid wear leveling of unused
data).
But it only works if you are using a filesystem that is "known" by the wear
leveling process. If you are using a different one, it fails badly, because
it tries to interpret a FAT that does not exists, and destroys your
filesystem while the wear leveling process is running. So this cheap pendrive
was too intelligent for filesystems other than FAT16....

So if you can use a different filesystem than FAT16/32 on your pendrive, it
does not matter what kind of filesystem you are using. The wear leveling
process has no clue about it and always "wear leveling" used *and* unused
data (means: every block of the whole disk) until it ruins the flash memory.

Hope it helps
Juergen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/