erofs: fix encoded extents handling
authorGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 8 Apr 2025 11:44:48 +0000 (19:44 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 9 Apr 2025 14:56:31 +0000 (22:56 +0800)
commitbe45319c9fb1d5c272da9fd34854a7d39e7f58d1
treeb4f32385e9df5e39b44e23f8e8fa1777c336b13e
parentd385f15d5ba0b4f62575eea09912268bf8136a56
erofs: fix encoded extents handling

 - The MSB 32 bits of `z_fragmentoff` are available only in extent
records of size >= 8B.

 - Use round_down() to calculate `lstart` as well as increase `pos`
   correspondingly for extent records of size == 8B.

Fixes: 1d191b4ca51d ("erofs: implement encoded extent metadata")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250408114448.4040220-2-hsiangkao@linux.alibaba.com
fs/erofs/zmap.c