summaryrefslogtreecommitdiffstats
path: root/fs/erofs/erofs_fs.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2021-04-07 12:39:20 +0800
committerGao Xiang <hsiangkao@redhat.com>2021-04-10 03:20:16 +0800
commit9f6cc76e6ff0631a99cd94eab8af137057633a52 (patch)
treeaf737fdf2f408fc6e33d46150e954bb1e6d799da /fs/erofs/erofs_fs.h
parent524887347fcb67faa0a63dd3c4c02ab48d4968d4 (diff)
downloadlinux-9f6cc76e6ff0631a99cd94eab8af137057633a52.tar.bz2
erofs: introduce physical cluster slab pools
Since multiple pcluster sizes could be used at once, the number of compressed pages will become a variable factor. It's necessary to introduce slab pools rather than a single slab cache now. This limits the pclustersize to 1M (Z_EROFS_PCLUSTER_MAX_SIZE), and get rid of the obsolete EROFS_FS_CLUSTER_PAGE_LIMIT, which has no use now. Link: https://lore.kernel.org/r/20210407043927.10623-4-xiang@kernel.org Acked-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/erofs_fs.h')
-rw-r--r--fs/erofs/erofs_fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h
index 626b7d3e9ab7..76777673eb63 100644
--- a/fs/erofs/erofs_fs.h
+++ b/fs/erofs/erofs_fs.h
@@ -201,6 +201,9 @@ static inline unsigned int erofs_xattr_entry_size(struct erofs_xattr_entry *e)
e->e_name_len + le16_to_cpu(e->e_value_size));
}
+/* maximum supported size of a physical compression cluster */
+#define Z_EROFS_PCLUSTER_MAX_SIZE (1024 * 1024)
+
/* available compression algorithm types (for h_algorithmtype) */
enum {
Z_EROFS_COMPRESSION_LZ4 = 0,