Support for EROFS

Hi,

In Android 13, EROFS (Enhanced Read-Only File System) will presumably be mandatory (instead of ext4).

The reasons are space saving and higher read speeds.
It would be great for Haiku to support this too.

More info:

https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git/

Haiku packagefs is already doing something similar.

5 Likes

Which doesn’t mean that we should stop now. Lets evaluate the pros and cons, it seems quite interesting even though I think they have different uses.

2 Likes

Read-only, compresses, devices with limited resources … isn´t that what squashfs addresses ? A wireless router is not exactly beefy in terms of resources .

The linked pdf explains the main differences (in the abstract at the start, you don’t have to dig into the technical details, but you can if you want more info):

However, existing compressed read-only file systems use fixedsized input compression, which causes significant I/O amplification and unnecessary computation. They also consume excessive runtime memory during decompression and deteriorate the performance when the runtime memory is scarce. In this paper, we describe EROFS1, a new compression-friendly read-only file system that leverages fixed-sized output compression and memory-efficient decompression to achieve
high performance with little extra memory overhead.

Maybe it can be used for HPKG compression?

Not the filesystem itself, but the PDF is an interesting read and can give some ideas on how to change the hpkg format to make it more efficient. But it would need to run benchmarks on what we have, maybe our use case is sufficiently different from squashfs usage in Linux.