summaryrefslogtreecommitdiff
path: root/fs/erofs/internal.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2022-09-23 04:49:15 +0300
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-09-26 18:55:43 +0300
commit5c2a64252c5dc4cfe78e5b2a531c118894e3d155 (patch)
tree356748bce348364c288493b9eeb9de8994b1a95e /fs/erofs/internal.h
parentb15b2e307c3a1970d92da77a3ef57ee53d119d8e (diff)
downloadlinux-5c2a64252c5dc4cfe78e5b2a531c118894e3d155.tar.xz
erofs: introduce partial-referenced pclusters
Due to deduplication for compressed data, pclusters can be partially referenced with their prefixes. Together with the user-space implementation, it enables EROFS variable-length global compressed data deduplication with rolling hash. Link: https://lore.kernel.org/r/20220923014915.4362-1-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@coolpad.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r--fs/erofs/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 9f89c1da6229..a6333c283e3d 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -291,6 +291,7 @@ EROFS_FEATURE_FUNCS(device_table, incompat, INCOMPAT_DEVICE_TABLE)
EROFS_FEATURE_FUNCS(compr_head2, incompat, INCOMPAT_COMPR_HEAD2)
EROFS_FEATURE_FUNCS(ztailpacking, incompat, INCOMPAT_ZTAILPACKING)
EROFS_FEATURE_FUNCS(fragments, incompat, INCOMPAT_FRAGMENTS)
+EROFS_FEATURE_FUNCS(dedupe, incompat, INCOMPAT_DEDUPE)
EROFS_FEATURE_FUNCS(sb_chksum, compat, COMPAT_SB_CHKSUM)
/* atomic flag definitions */
@@ -392,6 +393,7 @@ enum {
BH_Encoded = BH_PrivateStart,
BH_FullMapped,
BH_Fragment,
+ BH_Partialref,
};
/* Has a disk mapping */
@@ -404,6 +406,8 @@ enum {
#define EROFS_MAP_FULL_MAPPED (1 << BH_FullMapped)
/* Located in the special packed inode */
#define EROFS_MAP_FRAGMENT (1 << BH_Fragment)
+/* The extent refers to partial decompressed data */
+#define EROFS_MAP_PARTIAL_REF (1 << BH_Partialref)
struct erofs_map_blocks {
struct erofs_buf buf;