erofs: refine z_erofs_transform_plain() for sub-page block support
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 6 Dec 2023 09:10:56 +0000 (17:10 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 18 Dec 2023 07:49:39 +0000 (15:49 +0800)
commit1ca01520148af399899ed66af5c78330bb9ecaf2
tree1bdfb6a5a112bba4197ed26abc81ce5af111d39d
parente5aba911dee5e20fa82efbe13e0af8f38ea459e7
erofs: refine z_erofs_transform_plain() for sub-page block support

Sub-page block support is still unusable even with previous commits if
interlaced PLAIN pclusters exist.  Such pclusters can be found if the
fragment feature is enabled.

This commit tries to handle "the head part" of interlaced PLAIN
pclusters first: it was once explained in commit fdffc091e6f9 ("erofs:
support interlaced uncompressed data for compressed files").

It uses a unique way for both shifted and interlaced PLAIN pclusters.
As an added bonus, PLAIN pclusters larger than the block size is also
supported now for the upcoming large lclusters.

Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231206091057.87027-5-hsiangkao@linux.alibaba.com
fs/erofs/decompressor.c