summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-06-01 10:51:38 +1000
committerDave Chinner <david@fromorbit.com>2015-06-01 10:51:38 +1000
commitb9a350a1183efd7b63e59b6eaa39abfea908d0be (patch)
tree34144351b97b4dc749b6f6b003821af6c6a30824 /fs/xfs/xfs_mount.c
parente01c025fbdd5584bc2c8f6b88cb014f5f9bd790f (diff)
parent22ce1e1472fda6ce740cee966bb8e25a3cc662bd (diff)
downloadlinux-b9a350a1183efd7b63e59b6eaa39abfea908d0be.tar.gz
linux-b9a350a1183efd7b63e59b6eaa39abfea908d0be.tar.bz2
linux-b9a350a1183efd7b63e59b6eaa39abfea908d0be.zip
Merge branch 'xfs-sparse-inode' into for-next
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 6f23fbdfb365..461e791efad7 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -725,6 +725,22 @@ xfs_mountfs(
}
/*
+ * If enabled, sparse inode chunk alignment is expected to match the
+ * cluster size. Full inode chunk alignment must match the chunk size,
+ * but that is checked on sb read verification...
+ */
+ if (xfs_sb_version_hassparseinodes(&mp->m_sb) &&
+ mp->m_sb.sb_spino_align !=
+ XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size)) {
+ xfs_warn(mp,
+ "Sparse inode block alignment (%u) must match cluster size (%llu).",
+ mp->m_sb.sb_spino_align,
+ XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size));
+ error = -EINVAL;
+ goto out_remove_uuid;
+ }
+
+ /*
* Set inode alignment fields
*/
xfs_set_inoalignment(mp);