Re: [PATCH v5 07/17] f2fs: convert the ->private flag helpers to folio-only
From: Lance Yang
Date: Mon Sep 21 2026 - 03:39:44 EST
On 2026/9/21 10:28, Zi Yan wrote:
page-based ->private flag helpers are used in the compression path, where
large folios are not enabled. They can use folio versions with
page_folio(). The two remaining users in data.c and segment.c can use
fio->folio instead of fio->page (two are in a union).
Drop page-based helpers after the conversion and rename
PAGE_PRIVATE_{GET,SET,CLEAR}_FUNC() and the PAGE_PRIVATE_* flags to
F2FS_FOLIO_PRIVATE_* to match. Convert the folio/page union from
f2fs_io_info union to folio only, since no page user is left.
The folio helpers do a plain read-modify-write where the page ones used
set_bit()/clear_bit(). It is fine because the converted code either holds
folio lock or, in f2fs_compress_write_end_io(), matches what the
non-compressed code does in f2fs_write_end_bio().
Assisted-by: LLM
Suggested-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Co-developed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
To: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
To: Chao Yu <chao@xxxxxxxxxx>
Cc: linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Reviewed-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
---
Nice work! Feel free to add:
Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>