From 8f89926290c4b3d31748d5089b27952243be0693 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Sat, 9 Oct 2021 04:08:37 +0800 Subject: erofs: get compression algorithms directly on mapping Currently, z_erofs_map_blocks_iter() returns whether extents are compressed or not, and the decompression frontend gets the specific algorithms then. It works but not quite well in many aspests, for example: - The decompression frontend has to deal with whether extents are compressed or not again and lookup the algorithms if compressed. It's duplicated and too detailed about the on-disk mapping. - A new secondary compression head will be introduced later so that each file can have 2 compression algorithms at most for different type of data. It could increase the complexity of the decompression frontend if still handled in this way; - A new readmore decompression strategy will be introduced to get better performance for much bigger pcluster and lzma, which needs the specific algorithm in advance as well. Let's look up compression algorithms in z_erofs_map_blocks_iter() directly instead. Link: https://lore.kernel.org/r/20211008200839.24541-2-xiang@kernel.org Reviewed-by: Chao Yu Reviewed-by: Yue Hu Signed-off-by: Gao Xiang --- fs/erofs/compress.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'fs/erofs/compress.h') diff --git a/fs/erofs/compress.h b/fs/erofs/compress.h index 3701c72bacb2..ad62d1b4d371 100644 --- a/fs/erofs/compress.h +++ b/fs/erofs/compress.h @@ -8,11 +8,6 @@ #include "internal.h" -enum { - Z_EROFS_COMPRESSION_SHIFTED = Z_EROFS_COMPRESSION_MAX, - Z_EROFS_COMPRESSION_RUNTIME_MAX -}; - struct z_erofs_decompress_req { struct super_block *sb; struct page **in, **out; -- cgit v1.2.3-58-ga151