aboutsummaryrefslogtreecommitdiff
path: root/fs/erofs/sysfs.c
diff options
context:
space:
mode:
authorYue Hu2022-09-23 10:11:22 +0800
committerGao Xiang2022-09-26 23:55:39 +0800
commitb15b2e307c3a1970d92da77a3ef57ee53d119d8e (patch)
treee2fdea78f65addf0eb8af1abc4f3746897eddee1 /fs/erofs/sysfs.c
parentfdffc091e6f94602558bba712b51bc16f79fd6d5 (diff)
erofs: support on-disk compressed fragments data
Introduce on-disk compressed fragments data feature. This approach adds a new field called `h_fragmentoff' in the per-file compression header to indicate the fragment offset of each tail pcluster or the whole file in the special packed inode. Similar to ztailpacking, it will also find and record the 'headlcn' of the tail pcluster when initializing per-inode zmap for making follow-on requests more easy. Signed-off-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/YzHKxcFTlHGgXeH9@B-P7TQMD6M-0146.local Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/sysfs.c')
-rw-r--r--fs/erofs/sysfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c
index 341fb43ad587..dd6eb7eccf9a 100644
--- a/fs/erofs/sysfs.c
+++ b/fs/erofs/sysfs.c
@@ -76,6 +76,7 @@ EROFS_ATTR_FEATURE(device_table);
EROFS_ATTR_FEATURE(compr_head2);
EROFS_ATTR_FEATURE(sb_chksum);
EROFS_ATTR_FEATURE(ztailpacking);
+EROFS_ATTR_FEATURE(fragments);
static struct attribute *erofs_feat_attrs[] = {
ATTR_LIST(zero_padding),
@@ -86,6 +87,7 @@ static struct attribute *erofs_feat_attrs[] = {
ATTR_LIST(compr_head2),
ATTR_LIST(sb_chksum),
ATTR_LIST(ztailpacking),
+ ATTR_LIST(fragments),
NULL,
};
ATTRIBUTE_GROUPS(erofs_feat);