mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Yousef Alhouseen <alhouseenyousef@gmail.com>,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] xfs: zero newly allocated btree root space
Date: Tue, 7 Jul 2026 09:38:39 -0700	[thread overview]
Message-ID: <20260707163839.GC9392@frogsfrogsfrogs> (raw)
In-Reply-To: <aky0peCyFau-S6hL@nidhogg.toxiclabs.cc>

On Tue, Jul 07, 2026 at 10:15:01AM +0200, Carlos Maiolino wrote:
> On Thu, Jul 02, 2026 at 08:31:02AM -0700, Darrick J. Wong wrote:
> > On Thu, Jul 02, 2026 at 04:05:06AM -0700, Christoph Hellwig wrote:
> > > On Wed, Jul 01, 2026 at 08:52:34AM -0700, Darrick J. Wong wrote:
> > > > > This almost sounds like we should explicitly zero this case just for that
> > > > > particular case.  Although Darrick was kinda heading in a different
> > > > > direction and I don't want to start a fight here.
> > > > 
> > > > I'm fine with either solution; I simply prefer the one that fixes all
> > > > the current and future "oops we forgot to zero a hidden padding" bugs in
> > > > one action.
> > > 
> > > Maybe we should avoid creating hidden zero padding to start with? :)
> > > But this is a small allocation, and most of it gets overwritten
> > > while the cache is still hot, so I can live with the unconditional
> > > zeroing.  Still feels a bit odd to reach for the big hammer.
> > 
> > <shrug> If this is truly the only place where we forget to initialize
> > if_broot fully then I'm ok with just doing that and not going for
> > GFP_ZERO.  If we have an army of KASAN syzbotters whacking away at the
> > system, then I could reevaluate my resistance to whack-a-mole.
> > 
> > --D
> > 
> 
> Sorry, this conversation fell through the cracks.
> 
> I'd say the right approach here would be to measure the performance
> penalty if we opt to go with GFP_ZERO and document it on the patch
> description.
> But I'd also prefer to just closing this gap and initializing if_broot
> only here instead of GFP_ZEROing everything.

Ok, let's do that then.  I concede there /are/ far fewer
extents_to_btree calls than if_broot reallocations.

--D

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 10:06 Yousef Alhouseen
2026-06-30 16:11 ` Darrick J. Wong
2026-06-30 20:39   ` Yousef Alhouseen
2026-07-01 10:56     ` Christoph Hellwig
2026-07-01 15:52       ` Darrick J. Wong
2026-07-02 11:05         ` Christoph Hellwig
2026-07-02 15:31           ` Darrick J. Wong
2026-07-07  8:15             ` Carlos Maiolino
2026-07-07 16:38               ` Darrick J. Wong [this message]
2026-07-18 12:20                 ` Yousef Alhouseen

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=20260707163839.GC9392@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=alhouseenyousef@gmail.com \
    --cc=cem@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome