public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, allison.henderson@oracle.com
Subject: Re: [PATCH 2/3] xfs: don't hold xattr leaf buffers across transaction rolls
Date: Sun, 26 Jun 2022 20:46:52 -0700	[thread overview]
Message-ID: <YrkoLNBbF4KEJIah@magnolia> (raw)
In-Reply-To: <20220627012355.GA227878@dread.disaster.area>

On Mon, Jun 27, 2022 at 11:23:55AM +1000, Dave Chinner wrote:
> On Sun, Jun 26, 2022 at 03:03:58PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Now that we've established (again!) that empty xattr leaf buffers are
> > ok, we no longer need to bhold them to transactions when we're creating
> > new leaf blocks.  Get rid of the entire mechanism, which should simplify
> > the xattr code quite a bit.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> 
> Why?

The original justification for using bhold here was to prevent the AIL
from trying to write the empty leaf block into the fs during the brief
time that we release the buffer lock.  The reason for /that/ was to
prevent recovery from tripping over the empty ondisk block.

The bhold didn't totally solve that problem (hence removing the !count
check entirely 3 years later) but it /has/ made things sufficiently more
complicated that the resident expert (allison) and two maintainers (you
and I) tripped over the bheld leaf buffer handling...

> This code isn't there for correctness - it's just a way of
> avoiding needing to look up and lock the buffer immediately after we
> just created it and had a reference to it. This is a valid use of 
> xfs_trans_bhold(), so I'm not convinced that removing it makes the
> code better. Simpler, yes, but not necessarily better.

...so while I agree that this is a valid use of bhold, I also see that
the three people you'd most expect to wield the extra complexity have
not done it well, and decided to simplify the buffer usage back to a
more common use case in xfs.

--D

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

  reply	other threads:[~2022-06-27  3:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 22:03 [PATCHSET 0/3] xfs: random fixes for 5.19-rc5 Darrick J. Wong
2022-06-26 22:03 ` [PATCH 1/3] xfs: empty xattr leaf header blocks are not corruption Darrick J. Wong
2022-06-27  1:16   ` Dave Chinner
2022-06-27  3:59     ` Darrick J. Wong
2022-06-26 22:03 ` [PATCH 2/3] xfs: don't hold xattr leaf buffers across transaction rolls Darrick J. Wong
2022-06-27  1:23   ` Dave Chinner
2022-06-27  3:46     ` Darrick J. Wong [this message]
2022-06-27  5:10       ` Dave Chinner
2022-06-26 22:04 ` [PATCH 3/3] xfs: dont treat rt extents beyond EOF as eofblocks to be cleared Darrick J. Wong
2022-06-27  1:37   ` Dave Chinner
2022-06-27  3:57     ` Darrick J. Wong
2022-06-27  5:16       ` Dave Chinner
2022-06-27 20:59         ` Darrick J. Wong
2022-06-27 22:27           ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2022-06-27 21:35 [PATCHSET v2 0/3] xfs: random fixes for 5.19-rc5 Darrick J. Wong
2022-06-27 21:35 ` [PATCH 2/3] xfs: don't hold xattr leaf buffers across transaction rolls Darrick J. Wong

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=YrkoLNBbF4KEJIah@magnolia \
    --to=djwong@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=david@fromorbit.com \
    --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