Explorar o código

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>
Darrick J. Wong %!s(int64=8) %!d(string=hai) anos
pai
achega
d0e853f360
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      fs/xfs/libxfs/xfs_alloc.c

+ 2 - 0
fs/xfs/libxfs/xfs_alloc.c

@@ -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;
 }