Zarneth said:
But I thought the purpose of journaling was to STOP the problems with corruption when the power is shut off? :blink:
Correct. However, since on the gp2x the power is normally always shut off before the device is unmounted, that means every time you boot the machine with that card in it's going to trawl through the journal looking to see whats faulty due to the 'dirty' bit being set.
juanvvc said:
Fragmentation really is a problem in flash drivers where files with different sizes are often added and removed, like gamers do. My SD card really needs a defragmentation since fsck does not help any more
An SD card is always fragmented, even if you do a full format and then copy a single file to it. Defragging an SD card does nothing but reduce the life cycle. This is because when you write a block to an SD card, the first thing it does is choose a random location to write the block to. This is called wear levelling, and prevents certain parts of the card failing before others (eg. when the FAT is constantly updated).
Something I'm not seeing addressed at all in this thread, that I've been trying to get more information on: to the best of my knowledge, wear leveling on all simple consumer flash devices -- USB flash drives, SD cards, CF cards,
etc. depends entirely on the product's controller understanding the underlying filesystem.
If the device doesn't understand the filesystem, it can't know which sectors are in use, and which aren't; thus it can't pull data off a more-heavily-accessed sector and move it to a free sector that's more virginal. If it did that, it might overwrite data that's in use. At least, this is my understanding.
I've spent some time attempting to contact some of the bigger names in UFD/CF/SD manufacturing -- especially Transcend -- to find out if there are any products on the market that speak alternative filesystems. So far, I've gotten no responses at all. Given that, I'm forced to assume that any sealed-case product is much, much safer using FAT32 (or FAT16 for older or smaller products). There's more than one reason that those come preformatted as FAT from the factory, I'm thinking.
Unfortunately, all my research into wear leveling has returned old documents (for 16MB EEROM parts and the like) that confirm that the sealed product's wear leveling depends on understanding FAT, or newer documents for recent products that merely say, "We've got wear leveling!" but decline to explain how it works. The best information I've found is that (some?) CompactFlash controllers have reserved repair blocks and defect management, which would at least partially alleviate the problem.
If you or anyone else have more information on what filesystems can be used with wear leveling, and on what (type? brand?) of products, I'd appreciate it.
TIA