summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 17:46:25 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 17:47:17 +0100
commitc1b4a321ede083521b91c314e1c4fa233ac33740 (patch)
tree7fbf9f0bd0191eda2c268ce3bc8aaa2131823d33 /fs/xfs/xfs_mount.c
parentxfs: precalculate inodes and blocks per inode cluster (diff)
downloadlinux-c1b4a321ede083521b91c314e1c4fa233ac33740.tar.xz
linux-c1b4a321ede083521b91c314e1c4fa233ac33740.zip
xfs: precalculate cluster alignment in inodes and blocks
Store the inode cluster alignment information in units of inodes and blocks in the mount data so that we don't have to keep recalculating them. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 56d374675fd5..b4d8c318be3c 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -800,6 +800,8 @@ xfs_mountfs(
}
mp->m_blocks_per_cluster = xfs_icluster_size_fsb(mp);
mp->m_inodes_per_cluster = XFS_FSB_TO_INO(mp, mp->m_blocks_per_cluster);
+ mp->m_cluster_align = xfs_ialloc_cluster_alignment(mp);
+ mp->m_cluster_align_inodes = XFS_FSB_TO_INO(mp, mp->m_cluster_align);
/*
* If enabled, sparse inode chunk alignment is expected to match the