summaryrefslogtreecommitdiff
path: root/fs/erofs/zdata.c
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2021-04-07 12:39:18 +0800
committerGao Xiang <hsiangkao@redhat.com>2021-04-07 12:41:22 +0800
commit54e0b6c873dcbd02b9b479c893f6fba8fcbc6a9c (patch)
treecc32143a352c780dc58f6f9da9b8ff2ca1135cf6 /fs/erofs/zdata.c
parentfe6adcce7e297fcb49f40c62df42334690c3f848 (diff)
erofs: reserve physical_clusterbits[]
Formal big pcluster design is actually more powerful / flexable than the previous thought whose pclustersize was fixed as power-of-2 blocks, which was obviously inefficient and space-wasting. Instead, pclustersize can now be set independently for each pcluster, so various pcluster sizes can also be used together in one file if mkfs wants (for example, according to data type and/or compression ratio). Let's get rid of previous physical_clusterbits[] setting (also notice that corresponding on-disk fields are still 0 for now). Therefore, head1/2 can be used for at most 2 different algorithms in one file and again pclustersize is now independent of these. Link: https://lore.kernel.org/r/20210407043927.10623-2-xiang@kernel.org Acked-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/zdata.c')
-rw-r--r--fs/erofs/zdata.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 4226f4115981..e3f0100d82d1 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -430,8 +430,7 @@ static int z_erofs_register_collection(struct z_erofs_collector *clt,
else
pcl->algorithmformat = Z_EROFS_COMPRESSION_SHIFTED;
- pcl->clusterbits = EROFS_I(inode)->z_physical_clusterbits[0];
- pcl->clusterbits -= PAGE_SHIFT;
+ pcl->clusterbits = 0;
/* new pclusters should be claimed as type 1, primary and followed */
pcl->next = clt->owned_head;