diff options
author | Dave Chinner <david@fromorbit.com> | 2015-06-01 02:51:38 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-06-01 02:51:38 +0200 |
commit | b9a350a1183efd7b63e59b6eaa39abfea908d0be (patch) | |
tree | 34144351b97b4dc749b6f6b003821af6c6a30824 /fs/xfs/xfs_mount.c | |
parent | Merge branch 'xfs-misc-fixes-for-4.2' into for-next (diff) | |
parent | xfs: enable sparse inode chunks for v5 superblocks (diff) | |
download | linux-b9a350a1183efd7b63e59b6eaa39abfea908d0be.tar.xz 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.c | 16 |
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); |