Re: [PATCH v3 06/14] f2fs: stop using PG_private

From: Zi Yan

Date: Thu Sep 10 2026 - 17:11:52 EST


On Thu Sep 10, 2026 at 8:21 AM EDT, Zi Yan wrote:
> On 10 Sep 2026, at 3:35, David Hildenbrand (Arm) wrote:
>
>> On 9/9/26 19:47, Tal Zussman wrote:
>>> On 9/9/26 3:48 PM, David Hildenbrand (Arm) wrote:
>>>> On 9/8/26 20:20, Tal Zussman wrote:
>>>>>
>>>>> I have a WIP series of ~30 patches converting much of the remaining page
>>>>> users in f2fs (including the below) to folios. Still have to do some
>>>>> testing and clean it up, but hoping to send it out in the next couple of
>>>>> weeks (in the hopes of eliminating some more folio_compat.c functions by
>>>>> next cycle...)
>>>>
>>>> Indeed best to wait a bit before flooding -mm even more, it's rather a lot at
>>>> this point.
>>>>
>>>> In the context of this series, it would be great if you could review whether the
>>>> diff I proposed would get the job done, thanks!
>>>>
>>>
>>> What it changes looks good, but I would go a little further.
>>
>> Thanks!
>>
>>>
>>> There are only two more users of page_private_gcing(), which pass fio->page.
>>> Those could easily be converted to folio_test_f2fs_gcing() by passing fio->folio,
>>> which is in a union with fio->page. That would let you delete the
>>> page_private_##name() implementation in PAGE_PRIVATE_GET_FUNC() as well and just
>>> remove the entire family. At that point PAGE_PRIVATE_{GET,SET,CLEAR}_FUNC()
>>> could be renamed to something like F2FS_FOLIO_PRIVATE_{GET,SET,CLEAR}_FUNC() and
>>> all of this cruft is gone and folio-based, with no more f2fs use of page_private()
>>> either.
>>>
>>> The renaming could be done as a later step, but I would get rid of the accessors
>>> as well in one swoop.
>>
>> Yes, either as part of the same patch or as a separate patch. Zi, can you take
>> care of that? Thanks!
>
> OK, I will come up with a patch based on your patch plus the suggestion here
> on top of this “f2fs: stop using PG_private”. I will post the patch here
> for feedback to avoid extra churn of the whole series.
>

OK, here is the patch. In addition to David's patch and Tal' suggestion,
I also
1. converted PAGE_PRIVATE_* flags to F2FS_FOLIO_PRIVATE_*,
2. converted page/folio union in f2fs_io_info to folio only, since no
one is using fio->page any more.

Let me know your feedback. I will add this to my patch series once you
are OK with it. Thanks.