Skip to content

linux: Modifying per-ag reservation to account for dependent allocations

Krister Johansen fstests linux-xfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5xfs: count the number of blocks in a per-ag reservationfs/xfs/xfs_fsops.c fs/xfs/xfs_fsops.h fs/xfs/xfs_mount.c +1 more+36 -00 replies
2/5xfs: move calculation in xfs_alloc_min_freelist to its own functionfs/xfs/libxfs/xfs_alloc.c+44 -310 replies
3/5xfs: make alloc_set_aside and friends aware of per-AG reservationsfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_mount.c+98 -30 replies
4/5xfs: push the agfl set aside into xfs_alloc_space_availablefs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_alloc.h fs/xfs/xfs_mount.c +1 more+20 -20 replies
5/5xfs: include min freelist in m_ag_max_usablefs/xfs/libxfs/xfs_alloc.c+10 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] linux: Modifying per-ag reservation to account for dependent allocations

Hi,
These patches attempt to address the problem where dependent allocations fail during a multi allocation transaction, often as a result of refilling the AGFL. The failure results in a filesystem shutdown. In many cases, it manifests as a warn in xfs_bmap_extents_to_btree, when the dependent b-tree conversion fails after inadvertently getting an ENOSPC.

The RFC series was here:

https://lore.kernel.org/linux-xfs/[email protected]/T/#t

This series attempts follows David's guidance around implementing the reservation using the existing xfs_alloc_ag_max_usable and XFS_ALLOCBT_AGFL_RESERVE mechanisms. This mostly worked as advertised (thanks!), however, a few additional patches were needed in order to address test failures.

In particular, without the 'xfs: include min freelist in m_ag_max_usable' patch this series would fail the generic/223 tests around stripe alignment, because m_ag_max_usable was slightly larger than the actually usable space. This turned out to be the result of the first pre-fill of the AGFL and once corrected the tests pass.

This currently has a failure in xfs/306. I'm including a patch for xfstests to address this. The per-AG reservation size on the filesystem in that test increased by just enough that the filesystem reservation that was manually configured to 16 blocks was too small. Increasing that test's reservation to 17 allows it to continue. The failure manifests as dd failing to make progress and the dmesg filling with errors about xfs_discard_folio. Tracing showed that conversion of the delalloc to a real allocation was getting ENOSPC.

-K

Krister Johansen (5):
xfs: count the number of blocks in a per-ag reservation
xfs: move calculation in xfs_alloc_min_freelist to its own function
xfs: make alloc_set_aside and friends aware of per-AG reservations
xfs: push the agfl set aside into xfs_alloc_space_available
xfs: include min freelist in m_ag_max_usable

 fs/xfs/libxfs/xfs_alloc.c | 184 ++++++++++++++++++++++++++++++--------
 fs/xfs/libxfs/xfs_alloc.h |   1 +
 fs/xfs/xfs_fsops.c        |  21 +++++
 fs/xfs/xfs_fsops.h        |   1 +
 fs/xfs/xfs_mount.c        |  24 +++++
 fs/xfs/xfs_mount.h        |  12 +++
 6 files changed, 207 insertions(+), 36 deletions(-)

base-commit: 7bf888fa26e8f22bed4bc3965ab2a2953104ff96

Signature · 1 line
2.25.1