]> www.infradead.org Git - users/jedix/linux-maple.git/commit
erofs: teach z_erofs_scan_folios() to handle multi-page folios
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 3 Jul 2024 12:00:50 +0000 (20:00 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 8 Jul 2024 14:09:42 +0000 (22:09 +0800)
commit5b9654efb60423284dd0f8845812ac7216f60858
tree3c4056041af4167f7ee831d6ef80d3376849a82f
parent90cd33d79338b9df75ae91d1452be10e40443527
erofs: teach z_erofs_scan_folios() to handle multi-page folios

Previously, a folio just contains one page.  In order to enable large
folios, z_erofs_scan_folios() needs to handle multi-page folios.

First, this patch eliminates all gotos.  Instead, the new loop deal
with multiple parts in each folio.  It's simple to handle the parts
which belong to unmapped extents or fragment extents; but for encoded
extents, the page boundaries needs to be considered for `tight` and
`split` to keep inplace I/Os work correctly: when a part crosses the
page boundary, they needs to be reseted properly.

Besides, simplify `tight` derivation since Z_EROFS_PCLUSTER_HOOKED
has been removed for quite a while.

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