erofs: refine z_erofs_get_extent_compressedlen()
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 23 Jan 2025 09:01:09 +0000 (17:01 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 23 Jan 2025 09:12:11 +0000 (17:12 +0800)
commit8f9530aeeb4f756bdfa70510b40e5d28ea3c742e
tree2716080256c41c1c9d881496d80b9290747f6824
parent6e2c2342e2b608264cf763a27410295b05995191
erofs: refine z_erofs_get_extent_compressedlen()

 - Set `compressedblks = 1` directly for non-bigpcluster cases.  This
   simplifies the logic a bit since lcluster sizes larger than one block
   are unsupported and the details remain unclear.

 - For Z_EROFS_LCLUSTER_TYPE_PLAIN pclusters, avoid assuming
   `compressedblks = 1` by default.  Instead, check if
   Z_EROFS_ADVISE_BIG_PCLUSTER_2 is set.

It basically has no impact to existing valid images, but it's useful to
find the gap to prepare for large PLAIN pclusters.

Link: https://lore.kernel.org/r/20250123090109.973463-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/zmap.c