diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-03 18:11:24 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-03 18:11:24 +0200 |
commit | d0e853f3600cd2a3f7c4a067dc38155c77c51df9 (patch) | |
tree | 78dbdb0332cb24d52e9931befa292b90a8719983 /fs/xfs/libxfs/xfs_alloc.c | |
parent | xfs: add refcount btree block detection to log recovery (diff) | |
download | linux-d0e853f3600cd2a3f7c4a067dc38155c77c51df9.tar.xz linux-d0e853f3600cd2a3f7c4a067dc38155c77c51df9.zip |
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/xfs/libxfs/xfs_alloc.c')
-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 be7e3fcefd73..effb64cf714f 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; } |