Posts

Showing posts with the label btrfs on Android

Experimenting around btrfs on Android

Image
As covered before , btrfs might be an exciting thing to try on Android. Although f2fs is clearly the king of the performance on Android , my inner mouth was keep saying to try it out, so I did. Kernelspace The first step is to enable btrfs kernel module... or is it? The latest phone I had at the time when I started this project was the OnePlus 3, which used a 3.18 kernel. The btrfs in 3.18 kernel claims itself as an unstable filesystem . So before I start experimenting around btrfs, I decided to port a more recent, stable version of btrfs to the OnePlus 3's kernel. I picked the 4.9 kernel's btrfs as the 4.9 kernel is the latest LTS kernel as the time of writing this post. For those who are unfamiliar with Linux kernel development, backporting a kernel module is a hideous process. Not only you have to fix a ton of compilation errors, you have to dig through the entire Git commit history to properly fix API usages. You also have to backport some other commi...

Filesystem story on Android

Filesystem on Linux is always an interesting topic. Since most of the bottleneck on a modern computer is I/O to disk, playing around with filesystems can result in a pretty significant improvement, both in reliability and performance(although those two tends to not go under a same sentence). I personally use the following setup on my Linux desktop :  - xfs on the root partition for best reliability  - f2fs on the home partition for better performance  - ext4 with writeback, nobarrier mode on the build output partition for best " I-don't-care-about-redundancy-level-performance ".  - btrfs with zlib compression on the back-up HDD for efficient space usage and snapshots. While there is about a dozen different popular filesystems on Linux desktop/server setups, filesystem story on Android is somewhat boring. YAFFS2 In the early days(we're talking Galaxy S1 era), most Android devices used yaffs2 filesystem. One thing to note here, is that y...