All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] erofs-utils: compressed fragments feature
@ 2022-07-11  9:09 Yue Hu
       [not found] ` <cover.1657530420.git.huyue2@coolpad.com>
  2022-07-11 10:02 ` [RFC PATCH 0/3] erofs-utils: compressed fragments feature Gao Xiang
  0 siblings, 2 replies; 6+ messages in thread
From: Yue Hu @ 2022-07-11  9:09 UTC (permalink / raw)
  To: linux-erofs; +Cc: Yue Hu, zhangwen, shaojunjun, zbestahu

In order to achieve greater compression ratio, let's introduce
compressed fragments feature which can merge tail of per-file or the
whole files into one special inode to reach the target.

And we can also set pcluster size to fragments inode for different
compression requirments.

In this patchset, we also improve the uncompressed data layout of
compressed files. Just write it from 'clusterofs' instead of 0 since it
can benefit from in-place I/O. For now, it only goes with fragments.

The main idea above is from Xiang.

Here is some test data of Linux 5.10.87 source code under Ubuntu 18.04:

linux-5.10.87 (erofs, uncompressed)                1.1G

linux-5.10.87 (erofs, lz4hc,12 4k fragments,4k)    304M
linux-5.10.87 (erofs, lz4hc,12 8k fragments,8k)    271M
linux-5.10.87 (erofs, lz4hc,12 16k fragments,16k)  245M
linux-5.10.87 (erofs, lz4hc,12 32k fragments,32k)  228M
linux-5.10.87 (erofs, lz4hc,12 64k fragments,64k)  220M

linux-5.10.87 (erofs, lz4hc,12 4k vanilla)         396M
linux-5.10.87 (erofs, lz4hc,12 8k vanilla)         376M
linux-5.10.87 (erofs, lz4hc,12 16k vanilla)        364M
linux-5.10.87 (erofs, lz4hc,12 32k vanilla)        359M
linux-5.10.87 (erofs, lz4hc,12 64k vanilla)        358M

Usage:
mkfs.erofs -zlz4hc,12 -C65536 -Efragments,65536 foo.erofs.img foo/

Yue Hu (3):
  erofs-utils: lib: add support for fragments data decompression
  erofs-utils: lib: support on-disk offset for shifted decompression
  erofs-utils: introduce compressed fragments support

 include/erofs/compress.h   |  2 +-
 include/erofs/config.h     |  3 +-
 include/erofs/decompress.h |  3 ++
 include/erofs/fragments.h  | 25 ++++++++++
 include/erofs/inode.h      |  2 +
 include/erofs/internal.h   |  9 ++++
 include/erofs_fs.h         | 20 ++++++--
 lib/Makefile.am            |  4 +-
 lib/compress.c             | 94 ++++++++++++++++++++++++++++----------
 lib/data.c                 | 33 ++++++++++++-
 lib/decompress.c           | 10 +++-
 lib/fragments.c            | 77 +++++++++++++++++++++++++++++++
 lib/inode.c                | 50 +++++++++++++-------
 lib/super.c                |  1 +
 lib/zmap.c                 | 14 ++++++
 mkfs/main.c                | 63 ++++++++++++++++++++++---
 16 files changed, 352 insertions(+), 58 deletions(-)
 create mode 100644 include/erofs/fragments.h
 create mode 100644 lib/fragments.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-11 10:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11  9:09 [RFC PATCH 0/3] erofs-utils: compressed fragments feature Yue Hu
     [not found] ` <cover.1657530420.git.huyue2@coolpad.com>
2022-07-11  9:09   ` [RFC PATCH 1/3] erofs-utils: lib: add support for fragments data decompression Yue Hu
2022-07-11  9:09   ` [RFC PATCH 2/3] erofs-utils: lib: support on-disk offset for shifted decompression Yue Hu
2022-07-11  9:09   ` [RFC PATCH 3/3] erofs-utils: introduce compressed fragments support Yue Hu
2022-07-11 10:02 ` [RFC PATCH 0/3] erofs-utils: compressed fragments feature Gao Xiang
2022-07-11 10:14   ` Yue Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.