[PATCH v2 0/3] xfs: fix a couple sparse chunk alloc problems

Brian Foster <[email protected]>
Newsgroups org.kernel.vger.linux-xfs
Message-ID <[email protected]>
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/[email protected]/

[1] https://lore.kernel.org/linux-xfs/[email protected]/

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.