diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 17:46:25 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 17:47:17 +0100 |
commit | c1b4a321ede083521b91c314e1c4fa233ac33740 (patch) | |
tree | 7fbf9f0bd0191eda2c268ce3bc8aaa2131823d33 /fs/xfs/xfs_mount.c | |
parent | xfs: precalculate inodes and blocks per inode cluster (diff) | |
download | linux-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.c | 2 |
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 |