Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0e853f3 authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: reserve AG space for the refcount btree root



Reduce the max AG usable space size so that we always have space for
the refcount btree root.

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent a90c00f0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -128,6 +128,8 @@ xfs_alloc_ag_max_usable(
		blocks++;		/* finobt root block */
	if (xfs_sb_version_hasrmapbt(&mp->m_sb))
		blocks++; 		/* rmap root block */
	if (xfs_sb_version_hasreflink(&mp->m_sb))
		blocks++;		/* refcount root block */

	return mp->m_sb.sb_agblocks - blocks;
}