]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't reserve per-AG space for an internal log
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 20 May 2019 18:25:39 +0000 (11:25 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 20 May 2019 18:25:39 +0000 (11:25 -0700)
commit28258d6db9f85ee120f1ca8ff4f544f264995341
tree9cf65e1f526111727adfc3fdfd5ce16f278587a5
parent49250288820449e26abffc1305ba221bd05ce90d
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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/libxfs/xfs_ialloc_btree.c
fs/xfs/libxfs/xfs_refcount_btree.c
fs/xfs/libxfs/xfs_rmap_btree.c