Sunday, December 12, 2010

Starting With Gingerbread, Android Will Use ext4 Filesystems

#Android, #GoogleNexusS, #Gingerbread, #ext4, Keeping your data safe. http://snapvoip.blogspot.com/
With any OS, one of the most important aspects is the data safety and Android OS is no different. Google and the Android team are also looking into making the Android OS more reliable. So they are letting us know the changes the Gingerbread is bringing. Starting with Gingerbread, Android file system is going to change to the ext4 leaving behind the YAFFS. ext4 is what I am using on my Linux boxes as well as what is underneath the Google data centers. Your Google Nexus S will certainly have ext4 file system.
So how does the game change with the new file system? Tim Bray has written a very nice post about what we should do to keep our data safe.
As anyone familiar with Linux file systems and writing programs to run on them, have learned to use a low level system call, fsync() to make sure that your data is synced with the permanent storage. Tim goes to lengths to explain about the importance of not relying on write() to send your data to file system. (If you are using SharedPreferences or SQLite, exclusively, you have less to worry as Android is taking care of the buffering) Otherwise you need to make sure that your data get written properly. The guarantee about buffering you thought you had is all gone with the introduction of ext4.
I don't really know about the Google Nexus S phone yet, if it is possible to remove the battery, (the Google Chrome Notebook CR-48 does yet CR-48 DATA is always safe :). So think about us users, who pull the battery out, in many occasions, to shut the system down by pulling the battery out, be the system be a single of multi tasking. Not only on Android, but it a good general practice, on any system, so follow along to read more about it at Android Developers Blog: Saving Data Safely

0 comments:

Blog Widget by LinkWithin