Re: [PATCH 22/25] fs/buffer: prevent WARN_ON in __alloc_pages_slowpath() when BS > PS
From: Darrick J. Wong
Date: Sat Oct 25 2025 - 01:13:51 EST
On Sat, Oct 25, 2025 at 05:45:29AM +0100, Matthew Wilcox wrote:
> On Sat, Oct 25, 2025 at 11:22:18AM +0800, libaokun@xxxxxxxxxxxxxxx wrote:
> > + while (1) {
> > + folio = __filemap_get_folio(mapping, index, fgp_flags,
> > + gfp & ~__GFP_NOFAIL);
> > + if (!IS_ERR(folio) || !(gfp & __GFP_NOFAIL))
> > + return folio;
> > +
> > + if (PTR_ERR(folio) != -ENOMEM && PTR_ERR(folio) != -EAGAIN)
> > + return folio;
> > +
> > + memalloc_retry_wait(gfp);
> > + }
>
> No, absolutely not. We're not having open-coded GFP_NOFAIL semantics.
> The right way forward is for ext4 to use iomap, not for buffer heads
> to support large block sizes.
Seconded.
--D