Skip to content

Commit d0e853f

Browse files
committed
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: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent a90c00f commit d0e853f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ xfs_alloc_ag_max_usable(
128128
blocks++; /* finobt root block */
129129
if (xfs_sb_version_hasrmapbt(&mp->m_sb))
130130
blocks++; /* rmap root block */
131+
if (xfs_sb_version_hasreflink(&mp->m_sb))
132+
blocks++; /* refcount root block */
131133

132134
return mp->m_sb.sb_agblocks - blocks;
133135
}

0 commit comments

Comments
 (0)