Re: [f2fs-dev] [PATCH 01/14] f2fs: extend folio state for large folio write path

From: Nanzhe Zhao

Date: Mon Sep 07 2026 - 02:55:33 EST


On Thu, 27 Aug 2026 13:51:06 -0700, Daeho Jeong wrote:
> I understand it is used to avoid failing in-flight I/O or writeback
> when allocating the subpage state. However, invoking __GFP_NOFAIL in
> memory reclaim/writeback paths risks OOM livelocks under extreme
> memory pressure.
>
> Ideally, we should ensure ffs is always pre-allocated during
> write_begin() and page_mkwrite() (where returning -ENOMEM to userspace
> is safe), so that the writeback path never has to allocate ffs on the
> fly with __GFP_NOFAIL.

Thanks for the review. I agree with your suggestion.
I'll remove GFP_NOFAIL in the next version.

By the way, I think GFP_NOIO is not necessary here either; GFP_NOFS
should be enough.

Hi Jaegeuk, what's your opinion?

Thanks,
Nanzhe