public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>,
	Dave Chinner <dchinner@redhat.com>,
	linux-xfs@vger.kernel.org
Subject: Re: fix buffer refcount races
Date: Sun, 12 Jan 2025 23:13:53 -0800	[thread overview]
Message-ID: <20250113071353.GA1306365@frogsfrogsfrogs> (raw)
In-Reply-To: <20250113051435.GA23103@lst.de>

On Mon, Jan 13, 2025 at 06:14:35AM +0100, Christoph Hellwig wrote:
> On Sun, Jan 12, 2025 at 09:08:46PM -0800, Darrick J. Wong wrote:
> > > This might actually be able to trigger the first one, but otherwise
> > > just means we're doing a pass through insert which will find it.
> > > For pure lookups using xfs_buf_incore it could cause us to miss buffer
> > > invalidation.  The fix for that is bigger and has bigger implications
> > > because it not requires all b_hold increments to be done under d_lock.
> > 
> > Just to be clear, should this sentence say
> > "...because it *now* requires"?
> 
> Yes.

<nod>

> > > This causes more contention, but as releasing the buffer always takes
> > > the lock it can't be too horrible.  I also have a only minimally
> > > tested series to switch it over to a lockref here:
> > > 
> > >     http://git.infradead.org/?p=users/hch/xfs.git;a=shortlog;h=refs/heads/xfs-buffer-locking
> > 
> > Will take a look; some of those patches look familiar. ;)
> 
> Well, the first batch after these fixes are the buffer cleanups I
> reposted last week that you've mostly but not entirely reviewed.  The
> reminder only really depends on them for changed context.

That should be done now. :)

--D

      reply	other threads:[~2025-01-13  7:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13  4:24 fix buffer refcount races Christoph Hellwig
2025-01-13  4:24 ` [PATCH 1/2] xfs: check for dead buffers in xfs_buf_find_insert Christoph Hellwig
2025-01-13  4:56   ` Darrick J. Wong
2025-01-14  0:24   ` Dave Chinner
2025-01-13  4:24 ` [PATCH 2/2] xfs: fix buffer lookup vs release race Christoph Hellwig
2025-01-13 17:55   ` Darrick J. Wong
2025-01-13 20:55   ` Dave Chinner
2025-01-15  5:38     ` Christoph Hellwig
2025-01-15 11:21       ` Dave Chinner
2025-01-13  5:08 ` fix buffer refcount races Darrick J. Wong
2025-01-13  5:14   ` Christoph Hellwig
2025-01-13  7:13     ` Darrick J. Wong [this message]

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=20250113071353.GA1306365@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=dchinner@redhat.com \
    --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