On 25 Sep 2008 at 12:41, Doc Shipley wrote:
Wikipedia claims that CF cards do internal wear
leveling, which
matches my memory.
A little poking around on the web shows that at least some
"industrial grade" CF cards contain wear leveling, but the CFA spec
(
http://www.compactflash.org) only mentions "defect management",
which is a whole different bucket of fish. What the lower-end
consumer devices do is anyone's guess.
There are a couple of flash-storage-oriented
filesystems available
for Linux. JFFS2 is the only one I'm familiar with, and it does
primitive write-cycle leveling. If I remember right, it does this
mostly by writing out dirty pages to a new block rather than updating
the existing block.
Here's the rub--JFFS2 is *not* recommended for CF or USB flash
drives. Here's the text from
http://www.linux-mtd.infradead.org/faq/jffs2.html#L_stick_jffs2
"I am going to use JFFS2 on top of my USB stick/CF card/etc, is it
OK?
USB sticks, CompactFlash cards and other removable flash media are
not MTD devices. They are block devices. They do contain flash chip
inside, but they also contain some translation layer above which
emulates block device. This translation layer is implemented in
hardware. So for outside world these devices look exactly as hard
drives, not like MTD devices.
Please, read this FAQ entry about using JFFS2 on top of hard drives.
So, the answer is probably yes, you technically can, but be sure you
realize why you do this. In general it is bad idea. It is much better
to use any conventional file system like ext2.
Also note, these devices are "black boxes". The way they implement
this flash-to-block device translation layer is not usually
published. And in many cases the algorithms used at this layer are
far from brilliant. For example, many USB sticks and other cards lose
data in case of unclean reboots/power cuts. So, be very careful. "
So, if I want to replace legacy IDE drives with CF, it doesn't sound
like JFFS2 is a good idea. Nor is it clear that all CF cards do wear
leveling.
Perhaps you can understand my confusion. There are situations where
I'd really like to use CF in place of existing rotating mass storage
in legacy applications, but the weasel words make me very chary.
Cheers,
Chuck