[PATCH v5 1/2] erofs: add on-disk definition for metadata compression

Chao Yu chao at kernel.org
Mon Jul 21 19:28:56 AEST 2025


On 7/17/25 15:08, Gao Xiang wrote:
> Filesystem metadata has a high degree of redundancy, so it should
> compress well in the general case.
> 
> Although metadata compression can increase overall I/O latency, many
> users care more about minimized image sizes than extreme runtime
> performance.  Let's implement metadata compression in response to user
> requests [1].
> 
> Actually, it's quite simple to implement metadata compression: since
> EROFS already supports per-inode compression, we can simply treat a
> special inode (called `the metabox inode`) as a container for compressed
> inode metadata.  Since EROFS supports multiple algorithms, users can
> even specify LZ4 for metadata and LZMA for data.
> 
> To better support incremental builds, the MSB of NIDs indicates where
> the inode metadata is located: if bit 63 is set, the inode itself should
> be read from `the metabox inode`.
> 
> Optionally, shared xattrs can also be kept in `the metabox inode` if
> COMPAT_SHARED_EA_IN_METABOX is set.
> 
> [1] https://issues.redhat.com/browse/RHEL-75783
> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Acked-by: Chao Yu <chao at kernel.org>

Thanks,


More information about the Linux-erofs mailing list