public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 0/3] xfs: fix perag iteration raciness
Date: Thu,  7 Oct 2021 08:50:50 -0400	[thread overview]
Message-ID: <20211007125053.1096868-1-bfoster@redhat.com> (raw)

Hi all,

This adds an iteration function to the perag iteration macros to tweak
the logic and avoid some raciness with growfs when relying on the
presence of xfs_perag structures. This manifests as a couple assert
failures reproduced by xfs/104 (which only seem to reproduce on ppc64le
at the moment; I haven't really dug into why).

This probably could use a couple more patches tacked on: one to fix up
the tag based lookup macro and another to audit the existing callers and
remove any spurious xfs_perag_put() calls. I don't think the former is
currently an issue an practice, but we should probably eliminate the
flaw regardless. I'm just sending the initial fixup on its own as a
first pass..

Brian

Brian Foster (3):
  xfs: fold perag loop iteration logic into helper function
  xfs: rename the next_agno perag iteration variable
  xfs: terminate perag iteration reliably on end agno

 fs/xfs/libxfs/xfs_ag.h | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-10-07 12:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 12:50 Brian Foster [this message]
2021-10-07 12:50 ` [PATCH 1/3] xfs: fold perag loop iteration logic into helper function Brian Foster
2021-10-07 12:50 ` [PATCH 2/3] xfs: rename the next_agno perag iteration variable Brian Foster
2021-10-07 12:50 ` [PATCH 3/3] xfs: terminate perag iteration reliably on end agno Brian Foster
2021-10-07 23:02   ` Dave Chinner
2021-10-08 14:45     ` Brian Foster
2021-10-08 21:20       ` Dave Chinner

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=20211007125053.1096868-1-bfoster@redhat.com \
    --to=bfoster@redhat.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