Commit 6da84add authored by Gao Xiang's avatar Gao Xiang Committed by Chromeos LUCI
Browse files

FROMGIT: 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: default avatarChao Yu <chao@kernel.org>
Reviewed-by: default avatarYue Hu <huyue2@yulong.com>
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
(cherry picked from commit f296e187
 https://android.googlesource.com/kernel/common

 android13-5.10)

BUG=b:273658215
TEST=`tast run $DUT arc.Boot.vm`
TEST=`tast run $DUT arc.Playstore.vm`

Change-Id: I47c082f2a63d26c51a69b513595ecb52d48fd2c8
Signed-off-by: default avatarRyuichiro Chiba <chibar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4583884


Reviewed-by: default avatarSean Paul <sean@poorly.run>
Reviewed-by: default avatarHikaru Nishida <hikalium@chromium.org>
parent 0b05d94a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment