]> 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-07-19
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 28 Jun 2019 23:08:04 +0000 (16:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 19 Jul 2019 19:11:35 +0000 (12:11 -0700)
commit7455eda491ecc8cbcbb8a2ff46380b918eaa3ef5
tree6e6cebe3b5fc64b31033ea82b842d97db8481695
parentb6d90e6059be17fccc39d8997488636c3069f105
xfs: don't reserve per-AG space for an internal log

Source kernel commit: 5cd213b0fec640a46adc5e6e4dfc7763aa54b3b2

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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
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