Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH v3 0/4] xfs: fix a couple sparse chunk alloc problems
@ 2026-09-02 17:40 Brian Foster
  2026-09-02 17:40 ` [PATCH v3 1/4] xfs: set minleft correctly for sparse chunk errortag allocation Brian Foster
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Brian Foster @ 2026-09-02 17:40 UTC (permalink / raw)
  To: linux-xfs

Hi all,

Here's v3 of the series to fix the sparse chunk alloc shutdown. The
original report is available here[1].

This is mostly the same fundamental idea as v2, but the implementation
has been slightly reworked. Instead of creating and using a _minleft()
freelist calculation variant, we rework the min freelist helper to
calculate a min and a max for multi-alloc cases. The max is used
appropriately based on allocations that set args->minleft.

Patches 1 and 2 are unchanged from v2. Patch 3 is new and refactors the
semantics of xfs_alloc_min_freelist() as described above. Patch 4 is the
same general fix as v2, but rather than create its own helper the max
value is passed along with the min and they are used appropriately for
length checks and available space calculations.

I've also since realized that XFS_DEBUG seems to be what defeats the
custom reproducer, for whatever reason, so I can confirm this still
survives that test on !DEBUG. Otherwise the series survives fstests
without regression.

Thoughts, reviews, flames appreciated.

Brian

v3:
- Added patch 3 to refactor xfs_alloc_min_freelist() and calculate
  min/max.
- Updated patch 4 to use the max value for space available and longest
  extent checks.
v2: https://lore.kernel.org/linux-xfs/20260814132239.271492-1-bfoster@redhat.com/
- 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 (4):
  xfs: set minleft correctly for sparse chunk errortag allocation
  xfs: support additional levels in the agfl minimum calculation
  xfs: calculate AGFL max to support multiple-alloc transactions
  xfs: incorporate increased AGFL min requirement for minleft allocs

 fs/xfs/libxfs/xfs_alloc.c  | 106 +++++++++++++++++++++++++++----------
 fs/xfs/libxfs/xfs_alloc.h  |   7 +--
 fs/xfs/libxfs/xfs_bmap.c   |   7 ++-
 fs/xfs/libxfs/xfs_ialloc.c |  14 ++---
 4 files changed, 93 insertions(+), 41 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-09-04 14:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 17:40 [PATCH v3 0/4] xfs: fix a couple sparse chunk alloc problems Brian Foster
2026-09-02 17:40 ` [PATCH v3 1/4] xfs: set minleft correctly for sparse chunk errortag allocation Brian Foster
2026-09-02 17:40 ` [PATCH v3 2/4] xfs: support additional levels in the agfl minimum calculation Brian Foster
2026-09-03 16:58   ` [External] : " Mark Tinguely
2026-09-02 17:40 ` [PATCH v3 3/4] xfs: calculate AGFL max to support multiple-alloc transactions Brian Foster
2026-09-04 13:55   ` [External] : " Mark Tinguely
2026-09-02 17:40 ` [PATCH v3 4/4] xfs: incorporate increased AGFL min requirement for minleft allocs Brian Foster
2026-09-04 14:00   ` [External] : " Mark Tinguely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox