Re:Re: [PATCH v5 03/16] f2fs: support regular file buffered writes on large folios
From: Nanzhe Zhao
Date: Fri Oct 16 2026 - 01:53:43 EST
>> + f2fs_submit_page_read(inode, NULL, folio, index, blkaddr,
>> + REQ_OP_READ, false);
>
>@for_write: true? like we did in f2fs_write_begin -> f2fs_submit_page_read(.., true).
>Otherwise, it can run into mm reclaim after holding folio lock, causing deadlock issue
>potentially.
>
>Thanks,
>
>> +
In fact Sashiko also reported this issue, I've got a bit hesitated to chang @for_write to true
though, because I know that we already remove GFP_NOFS in folio allocation. And I also
check shrink_folio_list and study shrink_slab and swapfile in nowadays mainline and didn't
find a deadlock issue. But I do miss to take porting large folio on older kernel like 6.12 into
consideration. Anyway, I didn't receive report or test data on direct reclaim casuse by bio allocation
with GFP_NOIO, so I'll change @for_write to true in v6.