Re: [PATCH v8 12/15] f2fs: fix zeroing paths for large folios
From: Chao Yu
Date: Wed Oct 28 2026 - 21:34:32 EST
On 10/28/26 23:44, Nanzhe Zhao wrote:
> From: Nanzhe Zhao <zhaonanzhe@xxxxxxxxxx>
>
> Several f2fs zeroing paths still use PAGE_SIZE based offsets after
> a file mapping can contain large folios. This is fine for order-0
> folios, but it zeros the wrong range once the target block is not at
> offset 0 in a large folio.
>
> Use offset_in_folio() to translate the file block index to the folio
> offset before zeroing data in truncate_partial_data_page(), fill_zero(),
> and f2fs_get_new_data_folio().
>
> Signed-off-by: Nanzhe Zhao <zhaonanzhe@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,