summaryrefslogtreecommitdiffstats
path: root/fs/erofs/zdata.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2022-07-15 23:42:03 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-07-22 21:44:27 +0800
commit267f2492c8f71dac44399988b510f9bf6b074a51 (patch)
tree21c44fe56bc17f1e308d3895b5f8ea8ee0691cf2 /fs/erofs/zdata.h
parent2bfab9c0edac5f6031e8956477cd39f7162b208d (diff)
downloadlinux-267f2492c8f71dac44399988b510f9bf6b074a51.tar.bz2
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
Diffstat (limited to 'fs/erofs/zdata.h')
-rw-r--r--fs/erofs/zdata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/erofs/zdata.h b/fs/erofs/zdata.h
index 4ae3b763bc27..e7f04c4fbb81 100644
--- a/fs/erofs/zdata.h
+++ b/fs/erofs/zdata.h
@@ -84,6 +84,9 @@ struct z_erofs_pcluster {
/* L: whether partial decompression or not */
bool partial;
+ /* L: indicate several pageofs_outs or not */
+ bool multibases;
+
/* A: compressed bvecs (can be cached or inplaced pages) */
struct z_erofs_bvec compressed_bvecs[];
};