]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: don't reserve per-AG space for an internal log libxfs-5.2-sync_2019-06-25 libxfs-5.2-sync_2019-06-26
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Jun 2019 21:57:55 +0000 (14:57 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Jun 2019 01:46:26 +0000 (18:46 -0700)
commite75833fc4dffe808ab8ffbb0c967199660ba820a
tree8b2c56192d2fad80d91e18593faa29716283ace3
parent8ef6a1deb4d91151ff452b05c2a1c3e74bf83d52
xfs: don't reserve per-AG space for an internal log

It turns out that the log can consume nearly all the space in an AG, and
when this happens this it's possible that there will be less free space
in the AG than the reservation would try to hide.  On a debug kernel
this can trigger an ASSERT in xfs/250:

XFS: Assertion failed: xfs_perag_resv(pag, XFS_AG_RESV_METADATA)->ar_reserved + xfs_perag_resv(pag, XFS_AG_RESV_RMAPBT)->ar_reserved <= pag->pagf_freeblks + pag->pagf_flcount, file: fs/xfs/libxfs/xfs_ag_resv.c, line: 319

The log is permanently allocated, so we know we're never going to have
to expand the btrees to hold any records associated with the log space.
We therefore can treat the space as if it doesn't exist.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
libxfs/xfs_ialloc_btree.c
libxfs/xfs_refcount_btree.c
libxfs/xfs_rmap_btree.c