]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
erofs: refine z_erofs_get_extent_compressedlen()
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 23 Jul 2025 13:50:05 +0000 (09:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:48:45 +0000 (09:48 +0100)
commit9a84e212e3342423d1339d7e6d6abbe0ad6b80c8
tree17f7800d1ab8b9429c46362de24f692362b6ac86
parent4d0f12dc8335c8d26e369fd962ca0ec94d1c3165
erofs: refine z_erofs_get_extent_compressedlen()

[ Upstream commit 8f9530aeeb4f756bdfa70510b40e5d28ea3c742e ]

 - 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>
Stable-dep-of: b44686c8391b ("erofs: fix large fragment handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/erofs/zmap.c