aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-08-13 02:49:32 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:49:32 -0400
commit4249023a5d14f28d4e68ba15d24d25c0e5be71a6 (patch)
tree30d3d7992dc05879835bf96a5d7a6ab437d5a54b /fs/xfs/xfs_mount.c
parent77508ec8e6ed72c9ba8ca74248a7aabd664e3f57 (diff)
[XFS] cleanup xfs_mountfs
Remove all the useless flags and code keyed off it in xfs_mountfs. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31831a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 73f0ba1ec197..06f0a73bc93f 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -697,11 +697,11 @@ xfs_initialize_perag_data(xfs_mount_t *mp, xfs_agnumber_t agcount)
697 * Update alignment values based on mount options and sb values 697 * Update alignment values based on mount options and sb values
698 */ 698 */
699STATIC int 699STATIC int
700xfs_update_alignment(xfs_mount_t *mp, int mfsi_flags, __uint64_t *update_flags) 700xfs_update_alignment(xfs_mount_t *mp, __uint64_t *update_flags)
701{ 701{
702 xfs_sb_t *sbp = &(mp->m_sb); 702 xfs_sb_t *sbp = &(mp->m_sb);
703 703
704 if (mp->m_dalign && !(mfsi_flags & XFS_MFSI_SECOND)) { 704 if (mp->m_dalign) {
705 /* 705 /*
706 * If stripe unit and stripe width are not multiples 706 * If stripe unit and stripe width are not multiples
707 * of the fs blocksize turn off alignment. 707 * of the fs blocksize turn off alignment.
@@ -857,7 +857,7 @@ xfs_set_inoalignment(xfs_mount_t *mp)
857 * Check that the data (and log if separate) are an ok size. 857 * Check that the data (and log if separate) are an ok size.
858 */ 858 */
859STATIC int 859STATIC int
860xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags) 860xfs_check_sizes(xfs_mount_t *mp)
861{ 861{
862 xfs_buf_t *bp; 862 xfs_buf_t *bp;
863 xfs_daddr_t d; 863 xfs_daddr_t d;
@@ -880,8 +880,7 @@ xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags)
880 return error; 880 return error;
881 } 881 }
882 882
883 if (((mfsi_flags & XFS_MFSI_CLIENT) == 0) && 883 if (mp->m_logdev_targp != mp->m_ddev_targp) {
884 mp->m_logdev_targp != mp->m_ddev_targp) {
885 d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); 884 d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks);
886 if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { 885 if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) {
887 cmn_err(CE_WARN, "XFS: size check 3 failed"); 886 cmn_err(CE_WARN, "XFS: size check 3 failed");
@@ -916,8 +915,7 @@ xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags)
916 */ 915 */
917int 916int
918xfs_mountfs( 917xfs_mountfs(
919 xfs_mount_t *mp, 918 xfs_mount_t *mp)
920 int mfsi_flags)
921{ 919{
922 xfs_sb_t *sbp = &(mp->m_sb); 920 xfs_sb_t *sbp = &(mp->m_sb);
923 xfs_inode_t *rip; 921 xfs_inode_t *rip;
@@ -978,7 +976,7 @@ xfs_mountfs(
978 * allocator alignment is within an ag, therefore ag has 976 * allocator alignment is within an ag, therefore ag has
979 * to be aligned at stripe boundary. 977 * to be aligned at stripe boundary.
980 */ 978 */
981 error = xfs_update_alignment(mp, mfsi_flags, &update_flags); 979 error = xfs_update_alignment(mp, &update_flags);
982 if (error) 980 if (error)
983 goto error1; 981 goto error1;
984 982
@@ -997,8 +995,7 @@ xfs_mountfs(
997 * since a single partition filesystem is identical to a single 995 * since a single partition filesystem is identical to a single
998 * partition volume/filesystem. 996 * partition volume/filesystem.
999 */ 997 */
1000 if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && 998 if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
1001 (mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
1002 if (xfs_uuid_mount(mp)) { 999 if (xfs_uuid_mount(mp)) {
1003 error = XFS_ERROR(EINVAL); 1000 error = XFS_ERROR(EINVAL);
1004 goto error1; 1001 goto error1;
@@ -1026,7 +1023,7 @@ xfs_mountfs(
1026 /* 1023 /*
1027 * Check that the data (and log if separate) are an ok size. 1024 * Check that the data (and log if separate) are an ok size.
1028 */ 1025 */
1029 error = xfs_check_sizes(mp, mfsi_flags); 1026 error = xfs_check_sizes(mp);
1030 if (error) 1027 if (error)
1031 goto error1; 1028 goto error1;
1032 1029
@@ -1040,13 +1037,6 @@ xfs_mountfs(
1040 } 1037 }
1041 1038
1042 /* 1039 /*
1043 * For client case we are done now
1044 */
1045 if (mfsi_flags & XFS_MFSI_CLIENT) {
1046 return 0;
1047 }
1048
1049 /*
1050 * Copies the low order bits of the timestamp and the randomly 1040 * Copies the low order bits of the timestamp and the randomly
1051 * set "sequence" number out of a UUID. 1041 * set "sequence" number out of a UUID.
1052 */ 1042 */
@@ -1183,7 +1173,7 @@ xfs_mountfs(
1183 * delayed until after the root and real-time bitmap inodes 1173 * delayed until after the root and real-time bitmap inodes
1184 * were consistently read in. 1174 * were consistently read in.
1185 */ 1175 */
1186 error = xfs_log_mount_finish(mp, mfsi_flags); 1176 error = xfs_log_mount_finish(mp);
1187 if (error) { 1177 if (error) {
1188 cmn_err(CE_WARN, "XFS: log mount finish failed"); 1178 cmn_err(CE_WARN, "XFS: log mount finish failed");
1189 goto error4; 1179 goto error4;
@@ -1192,7 +1182,7 @@ xfs_mountfs(
1192 /* 1182 /*
1193 * Complete the quota initialisation, post-log-replay component. 1183 * Complete the quota initialisation, post-log-replay component.
1194 */ 1184 */
1195 error = XFS_QM_MOUNT(mp, quotamount, quotaflags, mfsi_flags); 1185 error = XFS_QM_MOUNT(mp, quotamount, quotaflags);
1196 if (error) 1186 if (error)
1197 goto error4; 1187 goto error4;
1198 1188