LWN.net Logo

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 10:06 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)
In reply to: Ext4 filesystem hits Android, no need to fear data loss (ars technica) by mikov
Parent article: Ext4 filesystem hits Android, no need to fear data loss (ars technica)

>Doesn't Ext4 rely on a generic block layer? Isn't that going to significantly affect the reliability and life of the flash?

Recent Samsung phones have wear-levelling in the hardware (they present their flash drives as block devices), so ext4 is perfectly OK.


(Log in to post comments)

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 11:09 UTC (Tue) by mikov (subscriber, #33179) [Link]

There is no wear leveling in hardware. There will have to be a separate controller with plenty of RAM and a fast CPU. Plus the trim command must be supported. Is it?
It seems like a horribly inefficient solution given that the phone itself already has lots of RAM and a fast CPU.
The wear leveling in standalone storage like compact flash is pretty bad for those reasons.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 11:18 UTC (Tue) by Los__D (guest, #15263) [Link]

While the flexibility of a pure software solution is greater, there is absolutely nothing inefficient about dedicated hardware to do wear leveling, just like there is nothing inefficient about RAID controllers, GPUs or other tasks done in specialized hardware instead of software.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 17:34 UTC (Tue) by mikov (subscriber, #33179) [Link]

Of course there lots of inefficiency in an independent controller. Before all wear leveling needs free space - without understanding the file system layout, and without the trim command, the so called "hardware" wear leveling (it is misnomer, of course) is very inefficient. AFAIK, the trim command itself is problematic because it is synchronous.

I have had horrible experiences with CompactFlash cards, even expensive ones from respected vendors.

I think few people realize how truly difficult it is to do good wear leveling. Even reads cause wear! Plus, the obvious "solutions" have a write multiplication factor of about 30...

This problem has been largely ignored recently to the extent that it isn't even mentioned at all in supposedly technical articles.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 29, 2010 4:15 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

I think few people realize how truly difficult it is to do good wear leveling. Even reads cause wear!

Really? I've never never heard that reads cause any appreciable wear. Can you share a reference?

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 29, 2010 15:14 UTC (Wed) by busterb (subscriber, #560) [Link]

Just use the 'noatime' mount option.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 29, 2010 20:16 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

atime updates are writes (even though the app only does a read). The comment I was replying to seemed to suggest that pure reads wear out flash. ie. if I mounted a volume read-only, that I could shorten its life dramatically by reading it regularly.

While I'm sure there's some impact to reading a flash cell, I've got to believe it's a few orders of magnitude smaller than the effect due to writes, and therefore generally ignorable.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 12:28 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

>There is no wear leveling in hardware. There will have to be a separate controller with plenty of RAM and a fast CPU.

There IS a specialized controller. However, it doesn't need a lot of RAM and a fast CPU, because it can offload some of the tasks on the main CPU.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 17:38 UTC (Tue) by mikov (subscriber, #33179) [Link]

Which tasks? It is presented as ATA interface, so AFAIK it can't offload anything.

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 29, 2010 0:18 UTC (Wed) by swetland (subscriber, #63414) [Link]

Well, looks like an SD/MMC device in the case of most devices we're working with, but yeah, no magical offload of the work to the host CPU. Looks like a block device. Behaves (mostly) like a block device. Probably supports TRIM. Etc.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds