diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-03 16:11:24 (GMT) |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-03 16:11:24 (GMT) |
commit | d0e853f3600cd2a3f7c4a067dc38155c77c51df9 (patch) | |
tree | 78dbdb0332cb24d52e9931befa292b90a8719983 /fs | |
parent | a90c00f05554e3a305cc2f4836e065368709926f (diff) | |
download | linux-d0e853f3600cd2a3f7c4a067dc38155c77c51df9.tar.xz |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index be7e3fc..effb64c 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/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; } |