Skip to content

erofs: prepare for folios, deduplication and kill PG_error

Gao Xiang linux-erofs lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 1 replyIn review
  2. v116 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- rename left pagevec words to bvpage (Yue Hu);

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16erofs: get rid of unneeded `inode', `map' and `sb'fs/erofs/zdata.c+19 -230 replies
2/16erofs: clean up z_erofs_collector_begin()fs/erofs/zdata.c+15 -170 replies
3/16erofs: introduce `z_erofs_parse_out_bvecs()'fs/erofs/zdata.c+43 -380 replies
4/16erofs: introduce bufvec to store decompressed buffersfs/erofs/zdata.c fs/erofs/zdata.h+153 -500 replies
5/16erofs: drop the old pagevec approachfs/erofs/zdata.c fs/erofs/zdata.h fs/erofs/zpvec.h+18 -1710 replies
6/16erofs: introduce `z_erofs_parse_in_bvecs'fs/erofs/zdata.c+80 -520 replies
7/16erofs: switch compressed_pages[] to bufvecfs/erofs/zdata.c fs/erofs/zdata.h+57 -600 replies
8/16erofs: rework online page handlingfs/erofs/zdata.c fs/erofs/zdata.h+42 -830 replies
9/16erofs: get rid of `enum z_erofs_page_type'fs/erofs/zdata.c+5 -250 replies
10/16erofs: clean up `enum z_erofs_collectmode'fs/erofs/zdata.c+31 -320 replies
11/16erofs: get rid of `z_pagemap_global'fs/erofs/zdata.c fs/erofs/zdata.h+4 -250 replies
12/16erofs: introduce struct z_erofs_decompress_backendfs/erofs/zdata.c fs/erofs/zdata.h+76 -670 replies
13/16erofs: try to leave (de)compressed_pages on stack if possiblefs/erofs/zdata.c+21 -130 replies
14/16erofs: introduce z_erofs_do_decompressed_bvec()fs/erofs/zdata.c+22 -270 replies
15/16erofs: record the longest decompressed size in this roundfs/erofs/zdata.c fs/erofs/zdata.h+31 -580 replies
16/16erofs: introduce multi-reference pclusters (fully-referenced)fs/erofs/compress.h fs/erofs/decompressor.c fs/erofs/zdata.c +1 more+87 -380 replies

Reviews trailers per patch

3 of 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYue HuChao Yu
SeriesA-b
1/16R-b
2/16R-b
3/16R-b
4/16
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/16] erofs: prepare for folios, deduplication and kill PG_error

Hi folks,

I've been doing this for almost 2 months, the main point of this is to support large folios and rolling hash deduplication for compressed data.

This patchset is as a start of this work targeting for the next 5.20, it introduces a flexable range representation for (de)compressed buffers instead of too relying on page(s) directly themselves, so large folios can laterly base on this work. Also, this patchset gets rid of all PG_error flags in the decompression code. It's a cleanup as a result as well.

In addition, this patchset kicks off rolling hash deduplication for compressed data by introducing fully-referenced multi-reference pclusters first instead of reporting fs corruption if one pcluster is introduced by several differnt extents. The full implementation is expected to be finished in the merge window after the next. One of my colleagues is actively working on the userspace part of this feature.

However, it's still easy to verify fully-referenced multi-reference pcluster by constructing some image by hand (see attachment):

Dataset: 300M
seq-read (data-deduplicated, read_ahead_kb 8192): 1095MiB/s seq-read (data-deduplicated, read_ahead_kb 4096): 771MiB/s seq-read (data-deduplicated, read_ahead_kb 512): 577MiB/s
seq-read (vanilla, read_ahead_kb 8192): 364MiB/s

Finally, this patchset survives ro-fsstress on my side.

Thanks,
Gao Xiang

Changes since v1:
- rename left pagevec words to bvpage (Yue Hu);

Gao Xiang (16):
erofs: get rid of unneeded inode', map' and `sb'
erofs: clean up z_erofs_collector_begin()
erofs: introduce `z_erofs_parse_out_bvecs()'
erofs: introduce bufvec to store decompressed buffers
erofs: drop the old pagevec approach
erofs: introduce `z_erofs_parse_in_bvecs'
erofs: switch compressed_pages[] to bufvec
erofs: rework online page handling
erofs: get rid of `enum z_erofs_page_type'
erofs: clean up `enum z_erofs_collectmode'
erofs: get rid of `z_pagemap_global'
erofs: introduce struct z_erofs_decompress_backend
erofs: try to leave (de)compressed_pages on stack if possible
erofs: introduce z_erofs_do_decompressed_bvec()
erofs: record the longest decompressed size in this round
erofs: introduce multi-reference pclusters (fully-referenced)

 fs/erofs/compress.h     |   2 +-
 fs/erofs/decompressor.c |   2 +-
 fs/erofs/zdata.c        | 785 +++++++++++++++++++++++-----------------
 fs/erofs/zdata.h        | 119 +++---
 fs/erofs/zpvec.h        | 159 --------
 5 files changed, 496 insertions(+), 571 deletions(-)
 delete mode 100644 fs/erofs/zpvec.h
Signature · 1 line
2.24.4