mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH v5 0/3] erofs: support metadata compression
Date: Thu, 17 Jul 2025 15:08:02 +0800	[thread overview]
Message-ID: <20250717070804.1446345-1-hsiangkao@linux.alibaba.com> (raw)
In-Reply-To: <20250716173314.308744-1-hsiangkao@linux.alibaba.com>

Hi,

This patchset implements metadata compression since many users are
interested in smaller image sizes (even at the cost of some I/O
latency).

In short, it uses a special "metabox" inode to gather all inode
metadata and then compresses it.  Since EROFS supports multiple
algorithms, you can select a faster algorithm (e.g., LZ4) from
the one used for data compression (e.g., LZMA).

Also see the detailed commit messages for more details.

Here are some preliminary numbers:

Command line: -zlzma,6 -Efragments,ztailpacking -C1048576

  ______________________________________________________________
 |         |_______ Vanilla _______|___ 2554769408 (2437MiB) ___|
 | Fedora  |_______ `-m4096` ______|___ 2524504064 (2408MiB) ___|
 |_________|_ `-m4096` (lz4hc,12) _|___ 2527326208 (2411MiB) ___|
 |         |_______ Vanilla _______|____ 378634240 ( 362MiB) ___|
 |  AOSP   |_______ `-m4096` ______|____ 377856000 ( 361MiB) ___|
 |_________|_ `-m4096` (lz4hc,12) _|____ 377942016 ( 361MiB) ___|
 |         |_______ Vanilla _______|______ 4837376 (4724KiB) ___|
 | OpenWRT |_______ `-m4096` ______|______ 4734976 (4624KiB) ___|
 |_________|_ `-m4096` (lz4hc,12) _|______ 4747264 (4636KiB) ___|

[ Note: directory data is still left uncompressed by `mkfs.erofs` so
        the final image sizes can be further smaller.  Directory data
        is just like regular data, which only needs some userspace work
        so let's address it later. ]

Thanks,
Gao Xiang

v3/4: https://lore.kernel.org/r/20250716173314.308744-1-hsiangkao@linux.alibaba.com 
Changes since v4:
 - address build failure (https://lore.kernel.org/r/202507170548.rvm67YSU-lkp@intel.com);
 - address build failure (https://lore.kernel.org/r/202507170506.Wzz1lR5I-lkp@intel.com).

Bo Liu (1):
  erofs: implement metadata compression

Gao Xiang (1):
  erofs: add on-disk definition for metadata compression

 Documentation/ABI/testing/sysfs-fs-erofs |  2 +-
 fs/erofs/data.c                          | 59 +++++++++++++++---------
 fs/erofs/decompressor.c                  |  2 +-
 fs/erofs/erofs_fs.h                      | 15 ++++--
 fs/erofs/fileio.c                        |  2 +-
 fs/erofs/fscache.c                       |  3 +-
 fs/erofs/inode.c                         |  5 +-
 fs/erofs/internal.h                      | 19 ++++++--
 fs/erofs/super.c                         | 22 ++++++++-
 fs/erofs/sysfs.c                         |  2 +
 fs/erofs/xattr.c                         | 26 +++++++----
 fs/erofs/zdata.c                         |  5 +-
 fs/erofs/zmap.c                          | 16 ++++---
 13 files changed, 123 insertions(+), 55 deletions(-)

-- 
2.43.5


  parent reply	other threads:[~2025-07-17  7:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 17:33 [PATCH v3 0/2] " Gao Xiang
2025-07-16 17:33 ` [PATCH v3 1/2] erofs: add on-disk definition for " Gao Xiang
2025-07-16 17:33 ` [PATCH v3 2/2] erofs: implement " Gao Xiang
2025-07-16 17:58   ` [PATCH v4 " Gao Xiang
2025-07-17  7:08 ` Gao Xiang [this message]
2025-07-17  7:08   ` [PATCH v5 1/2] erofs: add on-disk definition for " Gao Xiang
2025-07-21  9:28     ` Chao Yu
2025-07-17  7:08   ` [PATCH v5 2/2] erofs: implement " Gao Xiang
2025-07-18  3:19     ` [PATCH v6 " Gao Xiang
2025-07-21  9:29       ` Chao Yu
2025-07-22  0:32       ` [PATCH v7 " Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250717070804.1446345-1-hsiangkao@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®