linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] xfs: fix perag iteration raciness
@ 2021-10-07 12:50 Brian Foster
  2021-10-07 12:50 ` [PATCH 1/3] xfs: fold perag loop iteration logic into helper function Brian Foster
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brian Foster @ 2021-10-07 12:50 UTC (permalink / raw)
  To: linux-xfs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-08 21:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 12:50 [PATCH 0/3] xfs: fix perag iteration raciness Brian Foster
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).