xfs_mount.c (af34e09da42801c97f39f768c715f5511d914b52) | xfs_mount.c (5348778699bba92bf28b79863e09e7181d8cf95c) |
---|---|
1/* 2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 3 * All Rights Reserved. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * --- 867 unchanged lines hidden (view full) --- 876 /* 877 * Convert the stripe unit and width to FSBs. 878 */ 879 mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); 880 if (mp->m_dalign && (sbp->sb_agblocks % mp->m_dalign)) { 881 if (mp->m_flags & XFS_MOUNT_RETERR) { 882 return XFS_ERROR(EINVAL); 883 } | 1/* 2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 3 * All Rights Reserved. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * --- 867 unchanged lines hidden (view full) --- 876 /* 877 * Convert the stripe unit and width to FSBs. 878 */ 879 mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); 880 if (mp->m_dalign && (sbp->sb_agblocks % mp->m_dalign)) { 881 if (mp->m_flags & XFS_MOUNT_RETERR) { 882 return XFS_ERROR(EINVAL); 883 } |
884 xfs_fs_cmn_err(CE_WARN, mp, 885"stripe alignment turned off: sunit(%d)/swidth(%d) incompatible with agsize(%d)", | 884 xfs_warn(mp, 885 "stripe alignment turned off: sunit(%d)/swidth(%d) " 886 "incompatible with agsize(%d)", |
886 mp->m_dalign, mp->m_swidth, 887 sbp->sb_agblocks); 888 889 mp->m_dalign = 0; 890 mp->m_swidth = 0; 891 } else if (mp->m_dalign) { 892 mp->m_swidth = XFS_BB_TO_FSBT(mp, mp->m_swidth); 893 } else { 894 if (mp->m_flags & XFS_MOUNT_RETERR) { | 887 mp->m_dalign, mp->m_swidth, 888 sbp->sb_agblocks); 889 890 mp->m_dalign = 0; 891 mp->m_swidth = 0; 892 } else if (mp->m_dalign) { 893 mp->m_swidth = XFS_BB_TO_FSBT(mp, mp->m_swidth); 894 } else { 895 if (mp->m_flags & XFS_MOUNT_RETERR) { |
895 xfs_fs_cmn_err(CE_WARN, mp, 896"stripe alignment turned off: sunit(%d) less than bsize(%d)", 897 mp->m_dalign, | 896 xfs_warn(mp, 897 "stripe alignment turned off: sunit(%d) less than bsize(%d)", 898 mp->m_dalign, |
898 mp->m_blockmask +1); 899 return XFS_ERROR(EINVAL); 900 } 901 mp->m_swidth = 0; 902 } 903 } 904 905 /* --- 189 unchanged lines hidden (view full) --- 1095 /* 1096 * If the fs is readonly, let the incore superblock run 1097 * with quotas off but don't flush the update out to disk 1098 */ 1099 if (mp->m_flags & XFS_MOUNT_RDONLY) 1100 return 0; 1101 1102#ifdef QUOTADEBUG | 899 mp->m_blockmask +1); 900 return XFS_ERROR(EINVAL); 901 } 902 mp->m_swidth = 0; 903 } 904 } 905 906 /* --- 189 unchanged lines hidden (view full) --- 1096 /* 1097 * If the fs is readonly, let the incore superblock run 1098 * with quotas off but don't flush the update out to disk 1099 */ 1100 if (mp->m_flags & XFS_MOUNT_RDONLY) 1101 return 0; 1102 1103#ifdef QUOTADEBUG |
1103 xfs_fs_cmn_err(CE_NOTE, mp, "Writing superblock quota changes"); | 1104 xfs_notice(mp, "Writing superblock quota changes"); |
1104#endif 1105 1106 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE); 1107 error = xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0, 1108 XFS_DEFAULT_LOG_COUNT); 1109 if (error) { 1110 xfs_trans_cancel(tp, 0); | 1105#endif 1106 1107 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE); 1108 error = xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0, 1109 XFS_DEFAULT_LOG_COUNT); 1110 if (error) { 1111 xfs_trans_cancel(tp, 0); |
1111 xfs_fs_cmn_err(CE_ALERT, mp, 1112 "xfs_mount_reset_sbqflags: Superblock update failed!"); | 1112 xfs_alert(mp, "%s: Superblock update failed!", __func__); |
1113 return error; 1114 } 1115 1116 xfs_mod_sb(tp, XFS_SB_QFLAGS); 1117 return xfs_trans_commit(tp, 0); 1118} 1119 1120__uint64_t --- 1486 unchanged lines hidden --- | 1113 return error; 1114 } 1115 1116 xfs_mod_sb(tp, XFS_SB_QFLAGS); 1117 return xfs_trans_commit(tp, 0); 1118} 1119 1120__uint64_t --- 1486 unchanged lines hidden --- |