erofs: introduce multi-reference pclusters (fully-referenced)
authorGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 15 Jul 2022 15:42:03 +0000 (23:42 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 22 Jul 2022 13:44:27 +0000 (21:44 +0800)
commit267f2492c8f71dac44399988b510f9bf6b074a51
tree21c44fe56bc17f1e308d3895b5f8ea8ee0691cf2
parent2bfab9c0edac5f6031e8956477cd39f7162b208d
erofs: introduce multi-reference pclusters (fully-referenced)

Let's introduce multi-reference pclusters at runtime. In details,
if one pcluster is requested by multiple extents at almost the same
time (even belong to different files), the longest extent will be
decompressed as representative and the other extents are actually
copied from the longest one in one round.

After this patch, fully-referenced extents can be correctly handled
and the full decoding check needs to be bypassed for
partial-referenced extents.

Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220715154203.48093-17-hsiangkao@linux.alibaba.com
fs/erofs/compress.h
fs/erofs/decompressor.c
fs/erofs/zdata.c
fs/erofs/zdata.h