Commit 4249023a5d14f28d4e68ba15d24d25c0e5be71a6

Authored by Christoph Hellwig
Committed by Lachlan McIlroy
1 parent 77508ec8e6

[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>

Showing 10 changed files with 27 additions and 50 deletions Side-by-side Diff

fs/xfs/linux-2.6/xfs_super.c
... ... @@ -1722,7 +1722,7 @@
1722 1722 if (error)
1723 1723 goto out_free_sb;
1724 1724  
1725   - error = xfs_mountfs(mp, flags);
  1725 + error = xfs_mountfs(mp);
1726 1726 if (error)
1727 1727 goto out_filestream_unmount;
1728 1728  
fs/xfs/quota/xfs_qm.c
... ... @@ -310,8 +310,7 @@
310 310 */
311 311 void
312 312 xfs_qm_mount_quotas(
313   - xfs_mount_t *mp,
314   - int mfsi_flags)
  313 + xfs_mount_t *mp)
315 314 {
316 315 int error = 0;
317 316 uint sbf;
... ... @@ -346,8 +345,7 @@
346 345 /*
347 346 * If any of the quotas are not consistent, do a quotacheck.
348 347 */
349   - if (XFS_QM_NEED_QUOTACHECK(mp) &&
350   - !(mfsi_flags & XFS_MFSI_NO_QUOTACHECK)) {
  348 + if (XFS_QM_NEED_QUOTACHECK(mp)) {
351 349 error = xfs_qm_quotacheck(mp);
352 350 if (error) {
353 351 /* Quotacheck failed and disabled quotas. */
fs/xfs/quota/xfs_qm.h
... ... @@ -165,7 +165,7 @@
165 165 #define XFS_QM_RELE(xqm) ((xqm)->qm_nrefs--)
166 166  
167 167 extern void xfs_qm_destroy_quotainfo(xfs_mount_t *);
168   -extern void xfs_qm_mount_quotas(xfs_mount_t *, int);
  168 +extern void xfs_qm_mount_quotas(xfs_mount_t *);
169 169 extern int xfs_qm_quotacheck(xfs_mount_t *);
170 170 extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *);
171 171 extern int xfs_qm_unmount_quotas(xfs_mount_t *);
fs/xfs/quota/xfs_qm_bhv.c
... ... @@ -162,7 +162,7 @@
162 162 * mounting, and get on with the boring life
163 163 * without disk quotas.
164 164 */
165   - xfs_qm_mount_quotas(mp, 0);
  165 + xfs_qm_mount_quotas(mp);
166 166 } else {
167 167 /*
168 168 * Clear the quota flags, but remember them. This
169 169  
... ... @@ -184,13 +184,12 @@
184 184 xfs_qm_endmount(
185 185 xfs_mount_t *mp,
186 186 uint needquotamount,
187   - uint quotaflags,
188   - int mfsi_flags)
  187 + uint quotaflags)
189 188 {
190 189 if (needquotamount) {
191 190 ASSERT(mp->m_qflags == 0);
192 191 mp->m_qflags = quotaflags;
193   - xfs_qm_mount_quotas(mp, mfsi_flags);
  192 + xfs_qm_mount_quotas(mp);
194 193 }
195 194  
196 195 #if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)
... ... @@ -588,12 +588,12 @@
588 588 * mp - ubiquitous xfs mount point structure
589 589 */
590 590 int
591   -xfs_log_mount_finish(xfs_mount_t *mp, int mfsi_flags)
  591 +xfs_log_mount_finish(xfs_mount_t *mp)
592 592 {
593 593 int error;
594 594  
595 595 if (!(mp->m_flags & XFS_MOUNT_NORECOVERY))
596   - error = xlog_recover_finish(mp->m_log, mfsi_flags);
  596 + error = xlog_recover_finish(mp->m_log);
597 597 else {
598 598 error = 0;
599 599 ASSERT(mp->m_flags & XFS_MOUNT_RDONLY);
... ... @@ -149,7 +149,7 @@
149 149 struct xfs_buftarg *log_target,
150 150 xfs_daddr_t start_block,
151 151 int num_bblocks);
152   -int xfs_log_mount_finish(struct xfs_mount *mp, int);
  152 +int xfs_log_mount_finish(struct xfs_mount *mp);
153 153 void xfs_log_move_tail(struct xfs_mount *mp,
154 154 xfs_lsn_t tail_lsn);
155 155 int xfs_log_notify(struct xfs_mount *mp,
fs/xfs/xfs_log_priv.h
... ... @@ -468,7 +468,7 @@
468 468 xfs_daddr_t *head_blk,
469 469 xfs_daddr_t *tail_blk);
470 470 extern int xlog_recover(xlog_t *log);
471   -extern int xlog_recover_finish(xlog_t *log, int mfsi_flags);
  471 +extern int xlog_recover_finish(xlog_t *log);
472 472 extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int);
473 473 extern void xlog_recover_process_iunlinks(xlog_t *log);
474 474  
fs/xfs/xfs_log_recover.c
... ... @@ -3940,8 +3940,7 @@
3940 3940 */
3941 3941 int
3942 3942 xlog_recover_finish(
3943   - xlog_t *log,
3944   - int mfsi_flags)
  3943 + xlog_t *log)
3945 3944 {
3946 3945 /*
3947 3946 * Now we're ready to do the transactions needed for the
... ... @@ -3969,9 +3968,7 @@
3969 3968 xfs_log_force(log->l_mp, (xfs_lsn_t)0,
3970 3969 (XFS_LOG_FORCE | XFS_LOG_SYNC));
3971 3970  
3972   - if ( (mfsi_flags & XFS_MFSI_NOUNLINK) == 0 ) {
3973   - xlog_recover_process_iunlinks(log);
3974   - }
  3971 + xlog_recover_process_iunlinks(log);
3975 3972  
3976 3973 xlog_recover_check_summary(log);
3977 3974  
... ... @@ -697,11 +697,11 @@
697 697 * Update alignment values based on mount options and sb values
698 698 */
699 699 STATIC int
700   -xfs_update_alignment(xfs_mount_t *mp, int mfsi_flags, __uint64_t *update_flags)
  700 +xfs_update_alignment(xfs_mount_t *mp, __uint64_t *update_flags)
701 701 {
702 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 706 * If stripe unit and stripe width are not multiples
707 707 * of the fs blocksize turn off alignment.
... ... @@ -857,7 +857,7 @@
857 857 * Check that the data (and log if separate) are an ok size.
858 858 */
859 859 STATIC int
860   -xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags)
  860 +xfs_check_sizes(xfs_mount_t *mp)
861 861 {
862 862 xfs_buf_t *bp;
863 863 xfs_daddr_t d;
... ... @@ -880,8 +880,7 @@
880 880 return error;
881 881 }
882 882  
883   - if (((mfsi_flags & XFS_MFSI_CLIENT) == 0) &&
884   - mp->m_logdev_targp != mp->m_ddev_targp) {
  883 + if (mp->m_logdev_targp != mp->m_ddev_targp) {
885 884 d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks);
886 885 if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) {
887 886 cmn_err(CE_WARN, "XFS: size check 3 failed");
... ... @@ -916,8 +915,7 @@
916 915 */
917 916 int
918 917 xfs_mountfs(
919   - xfs_mount_t *mp,
920   - int mfsi_flags)
  918 + xfs_mount_t *mp)
921 919 {
922 920 xfs_sb_t *sbp = &(mp->m_sb);
923 921 xfs_inode_t *rip;
... ... @@ -978,7 +976,7 @@
978 976 * allocator alignment is within an ag, therefore ag has
979 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 980 if (error)
983 981 goto error1;
984 982  
... ... @@ -997,8 +995,7 @@
997 995 * since a single partition filesystem is identical to a single
998 996 * partition volume/filesystem.
999 997 */
1000   - if ((mfsi_flags & XFS_MFSI_SECOND) == 0 &&
1001   - (mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
  998 + if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
1002 999 if (xfs_uuid_mount(mp)) {
1003 1000 error = XFS_ERROR(EINVAL);
1004 1001 goto error1;
... ... @@ -1026,7 +1023,7 @@
1026 1023 /*
1027 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 1027 if (error)
1031 1028 goto error1;
1032 1029  
... ... @@ -1040,13 +1037,6 @@
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 1040 * Copies the low order bits of the timestamp and the randomly
1051 1041 * set "sequence" number out of a UUID.
1052 1042 */
... ... @@ -1183,7 +1173,7 @@
1183 1173 * delayed until after the root and real-time bitmap inodes
1184 1174 * were consistently read in.
1185 1175 */
1186   - error = xfs_log_mount_finish(mp, mfsi_flags);
  1176 + error = xfs_log_mount_finish(mp);
1187 1177 if (error) {
1188 1178 cmn_err(CE_WARN, "XFS: log mount finish failed");
1189 1179 goto error4;
... ... @@ -1192,7 +1182,7 @@
1192 1182 /*
1193 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 1186 if (error)
1197 1187 goto error4;
1198 1188  
... ... @@ -114,7 +114,7 @@
114 114 struct xfs_quotainfo;
115 115  
116 116 typedef int (*xfs_qminit_t)(struct xfs_mount *, uint *, uint *);
117   -typedef int (*xfs_qmmount_t)(struct xfs_mount *, uint, uint, int);
  117 +typedef int (*xfs_qmmount_t)(struct xfs_mount *, uint, uint);
118 118 typedef int (*xfs_qmunmount_t)(struct xfs_mount *);
119 119 typedef void (*xfs_qmdone_t)(struct xfs_mount *);
120 120 typedef void (*xfs_dqrele_t)(struct xfs_dquot *);
... ... @@ -158,8 +158,8 @@
158 158  
159 159 #define XFS_QM_INIT(mp, mnt, fl) \
160 160 (*(mp)->m_qm_ops->xfs_qminit)(mp, mnt, fl)
161   -#define XFS_QM_MOUNT(mp, mnt, fl, mfsi_flags) \
162   - (*(mp)->m_qm_ops->xfs_qmmount)(mp, mnt, fl, mfsi_flags)
  161 +#define XFS_QM_MOUNT(mp, mnt, fl) \
  162 + (*(mp)->m_qm_ops->xfs_qmmount)(mp, mnt, fl)
163 163 #define XFS_QM_UNMOUNT(mp) \
164 164 (*(mp)->m_qm_ops->xfs_qmunmount)(mp)
165 165 #define XFS_QM_DONE(mp) \
... ... @@ -442,13 +442,6 @@
442 442 /*
443 443 * Flags for xfs_mountfs
444 444 */
445   -#define XFS_MFSI_SECOND 0x01 /* Secondary mount -- skip stuff */
446   -#define XFS_MFSI_CLIENT 0x02 /* Is a client -- skip lots of stuff */
447   -/* XFS_MFSI_RRINODES */
448   -#define XFS_MFSI_NOUNLINK 0x08 /* Skip unlinked inode processing in */
449   - /* log recovery */
450   -#define XFS_MFSI_NO_QUOTACHECK 0x10 /* Skip quotacheck processing */
451   -/* XFS_MFSI_CONVERT_SUNIT */
452 445 #define XFS_MFSI_QUIET 0x40 /* Be silent if mount errors found */
453 446  
454 447 #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d)
... ... @@ -517,7 +510,7 @@
517 510  
518 511 extern void xfs_mod_sb(xfs_trans_t *, __int64_t);
519 512 extern int xfs_log_sbcount(xfs_mount_t *, uint);
520   -extern int xfs_mountfs(xfs_mount_t *mp, int);
  513 +extern int xfs_mountfs(xfs_mount_t *mp);
521 514 extern void xfs_mountfs_check_barriers(xfs_mount_t *mp);
522 515  
523 516 extern int xfs_unmountfs(xfs_mount_t *);