summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_format.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-08-03 11:31:47 +1000
committerDave Chinner <david@fromorbit.com>2016-08-03 11:31:47 +1000
commit8018026ef29756af6144e2e2e8dffc9c2ed0d6f7 (patch)
treee5c3ea9539212cac5e39a9e47f6ddd557820aa46 /fs/xfs/libxfs/xfs_format.h
parent00f4e4f9073cb6d455c27dc8e92b421edcdc5011 (diff)
downloadlinux-stable-8018026ef29756af6144e2e2e8dffc9c2ed0d6f7.tar.gz
linux-stable-8018026ef29756af6144e2e2e8dffc9c2ed0d6f7.tar.bz2
linux-stable-8018026ef29756af6144e2e2e8dffc9c2ed0d6f7.zip
xfs: rmap btree add more reserved blocks
Originally-From: Dave Chinner <dchinner@redhat.com> XFS reserves a small amount of space in each AG for the minimum number of free blocks needed for operation. Adding the rmap btree increases the number of reserved blocks, but it also increases the complexity of the calculation as the free inode btree is optional (like the rmbt). Rather than calculate the prealloc blocks every time we need to check it, add a function to calculate it at mount time and store it in the struct xfs_mount, and convert the XFS_PREALLOC_BLOCKS macro just to use the xfs-mount variable directly. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_format.h')
-rw-r--r--fs/xfs/libxfs/xfs_format.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 74f4d3da598c..3dbed011c29a 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -1319,18 +1319,11 @@ typedef __be32 xfs_inobt_ptr_t;
*/
#define XFS_RMAP_CRC_MAGIC 0x524d4233 /* 'RMB3' */
-/*
- * The first data block of an AG depends on whether the filesystem was formatted
- * with the finobt feature. If so, account for the finobt reserved root btree
- * block.
- */
-#define XFS_PREALLOC_BLOCKS(mp) \
+#define XFS_RMAP_BLOCK(mp) \
(xfs_sb_version_hasfinobt(&((mp)->m_sb)) ? \
XFS_FIBT_BLOCK(mp) + 1 : \
XFS_IBT_BLOCK(mp) + 1)
-
-
/*
* BMAP Btree format definitions
*