Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/4] xfs: lift setting __GFP_NOFAIL from xfs_buf_alloc_kmem to the caller
Date: Wed, 1 Jul 2026 09:03:41 -0700	[thread overview]
Message-ID: <20260701160341.GC6544@frogsfrogsfrogs> (raw)
In-Reply-To: <akTeZYyMbJNNDSxF@nidhogg.toxiclabs.cc>

On Wed, Jul 01, 2026 at 11:31:27AM +0200, Carlos Maiolino wrote:
> On Mon, Jun 29, 2026 at 05:52:54PM -0700, Darrick J. Wong wrote:
> > On Wed, Jun 17, 2026 at 07:58:03AM +0200, Christoph Hellwig wrote:
> > > The current __GFP_NOFAIL setting is wrong in some cases.  Prepare
> > > for fixing that by giving control to the caller.
> > 
> > Simple enough...
> 
> /me interprets it as a RwB

Yeah.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> 
> > 
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > > ---
> > >  fs/xfs/xfs_buf.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> > > index d3d44e3ff001..dce398337ad0 100644
> > > --- a/fs/xfs/xfs_buf.c
> > > +++ b/fs/xfs/xfs_buf.c
> > > @@ -145,7 +145,7 @@ xfs_buf_alloc_kmem(
> > >  	ASSERT(is_power_of_2(size));
> > >  	ASSERT(size < PAGE_SIZE);
> > >  
> > > -	bp->b_addr = kmalloc(size, gfp_mask | __GFP_NOFAIL);
> > > +	bp->b_addr = kmalloc(size, gfp_mask);
> > >  	if (!bp->b_addr)
> > >  		return -ENOMEM;
> > >  
> > > @@ -230,7 +230,7 @@ xfs_buf_alloc_backing_mem(
> > >  	 * smaller than PAGE_SIZE buffers used by XFS.
> > >  	 */
> > >  	if (size < PAGE_SIZE && is_power_of_2(size))
> > > -		return xfs_buf_alloc_kmem(bp, size, gfp_mask);
> > > +		return xfs_buf_alloc_kmem(bp, size, gfp_mask | __GFP_NOFAIL);
> > >  
> > >  	/*
> > >  	 * Don't bother with the retry loop for single PAGE allocations: vmalloc
> > > -- 
> > > 2.53.0
> > > 
> > > 
> > 

  reply	other threads:[~2026-07-01 16:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  5:58 fix GFP_ flag use in the buffer cache Christoph Hellwig
2026-06-17  5:58 ` [PATCH 1/4] xfs: split up xfs_buf_alloc_backing_mem Christoph Hellwig
2026-06-22 12:17   ` Carlos Maiolino
2026-06-30  0:52   ` Darrick J. Wong
2026-06-17  5:58 ` [PATCH 2/4] xfs: lift setting __GFP_NOFAIL from xfs_buf_alloc_kmem to the caller Christoph Hellwig
2026-06-22 12:22   ` Carlos Maiolino
2026-06-30  0:52   ` Darrick J. Wong
2026-07-01  9:31     ` Carlos Maiolino
2026-07-01 16:03       ` Darrick J. Wong [this message]
2026-06-17  5:58 ` [PATCH 3/4] xfs: fix incorrect use of gfp flags in xfs_buf_alloc_backing_mem Christoph Hellwig
2026-06-22 12:31   ` Carlos Maiolino
2026-06-30  1:49   ` Darrick J. Wong
2026-06-30  5:15     ` Christoph Hellwig
2026-06-17  5:58 ` [PATCH 4/4] xfs: simplify the failure path in xfs_buf_alloc_vmalloc Christoph Hellwig
2026-06-22 12:34   ` Carlos Maiolino
2026-06-24  7:41     ` Christoph Hellwig
2026-06-24  8:25       ` Carlos Maiolino
2026-06-30  1:51     ` Darrick J. Wong
2026-07-01 12:50 ` fix GFP_ flag use in the buffer cache Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701160341.GC6544@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox