summaryrefslogtreecommitdiff
path: root/fs/erofs/internal.h
diff options
context:
space:
mode:
authorJia Zhu <zhujia.zj@bytedance.com>2022-09-18 12:34:53 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-09-20 08:01:53 +0800
commit8b7adf1dff3d5baf687acda936f193f80b7e0179 (patch)
treefd151153106005976743f20a8d8b71d1c0d4ec68 /fs/erofs/internal.h
parente1de2da0b7ac2dc0120c2ba8c7044788611933ea (diff)
erofs: introduce fscache-based domain
A new fscache-based shared domain mode is going to be introduced for erofs. In which case, same data blobs in same domain will be shared and reused to reduce on-disk space usage. The implementation of sharing blobs will be introduced in subsequent patches. Signed-off-by: Jia Zhu <zhujia.zj@bytedance.com> Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com> Link: https://lore.kernel.org/r/20220918043456.147-4-zhujia.zj@bytedance.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r--fs/erofs/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 39fb124ce670..93fc4ad61cfb 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -76,6 +76,7 @@ struct erofs_mount_opts {
#endif
unsigned int mount_opt;
char *fsid;
+ char *domain_id;
};
struct erofs_dev_context {
@@ -98,6 +99,13 @@ struct erofs_sb_lz4_info {
u16 max_pclusterblks;
};
+struct erofs_domain {
+ refcount_t ref;
+ struct list_head list;
+ struct fscache_volume *volume;
+ char *domain_id;
+};
+
struct erofs_fscache {
struct fscache_cookie *cookie;
struct inode *inode;
@@ -157,6 +165,7 @@ struct erofs_sb_info {
/* fscache support */
struct fscache_volume *volume;
struct erofs_fscache *s_fscache;
+ struct erofs_domain *domain;
};
#define EROFS_SB(sb) ((struct erofs_sb_info *)(sb)->s_fs_info)