linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] xfs: fix a couple sparse chunk alloc problems
@ 2026-08-14 13:22 Brian Foster
  2026-08-14 13:22 ` [PATCH v2 1/3] xfs: set minleft correctly for sparse chunk errortag allocation Brian Foster
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Brian Foster @ 2026-08-14 13:22 UTC (permalink / raw)
  To: linux-xfs; +Cc: Matt Fleming

Hi all,

Here's v2 of the series to fix the sparse chunk alloc shutdown. The
original report is available here[1]. After some discussion on v1, this
takes a slightly different approach to treat this as an allocator flaw.
The solution is essentially to add the additional min_free block
requirement to minleft for allocs where minleft != 0. See the commit log
for patch 3 for further detail.

Patch 1 is the same DEBUG mode bug fix from v1. Patch 2 refactors the
agfl min free helper for use in patch 3. Patch 3 makes the actual logic
fix.

This survives some fstests runs without regression. For some reason the
sparse inode reproducer is failing to work properly on the current
baseline (can't create the requisite fs state) so I can't reconfirm
that, but I don't expect anything would have changed there.

Thoughts, reviews, flames appreciated.

Brian

v2:
- Reworked fix logic into allocator instead of sparse inode alloc
  specific.
- Dropped Fixes: tag since this is no longer directly correlated to
  sparse inodes.
v1: https://lore.kernel.org/linux-xfs/20260731163337.152522-1-bfoster@redhat.com/

[1] https://lore.kernel.org/linux-xfs/20260717130429.1838767-1-matt@readmodwrite.com/

Brian Foster (3):
  xfs: set minleft correctly for sparse chunk errortag allocation
  xfs: support additional levels in the agfl minimum calculation
  xfs: incorporate increased AGFL min requirement for minleft allocs

 fs/xfs/libxfs/xfs_alloc.c  | 60 ++++++++++++++++++++++++++++++++------
 fs/xfs/libxfs/xfs_alloc.h  |  2 ++
 fs/xfs/libxfs/xfs_bmap.c   |  2 +-
 fs/xfs/libxfs/xfs_ialloc.c | 10 +++----
 4 files changed, 58 insertions(+), 16 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-08-14 16:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 13:22 [PATCH v2 0/3] xfs: fix a couple sparse chunk alloc problems Brian Foster
2026-08-14 13:22 ` [PATCH v2 1/3] xfs: set minleft correctly for sparse chunk errortag allocation Brian Foster
2026-08-14 13:22 ` [PATCH v2 2/3] xfs: support additional levels in the agfl minimum calculation Brian Foster
2026-08-14 13:22 ` [PATCH v2 3/3] xfs: incorporate increased AGFL min requirement for minleft allocs Brian Foster
2026-08-14 13:57   ` Brian Foster
2026-08-14 14:15     ` [External] : " Mark Tinguely
2026-08-14 14:47       ` Brian Foster
2026-08-14 15:18         ` Mark Tinguely
2026-08-14 16:24           ` Brian Foster

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).