@@ -39,13 +39,6 @@ STATIC int
3939xlog_clear_stale_blocks (
4040 struct xlog * ,
4141 xfs_lsn_t );
42- #if defined(DEBUG )
43- STATIC void
44- xlog_recover_check_summary (
45- struct xlog * );
46- #else
47- #define xlog_recover_check_summary (log )
48- #endif
4942STATIC int
5043xlog_do_recovery_pass (
5144 struct xlog * , xfs_daddr_t , xfs_daddr_t , int , xfs_daddr_t * );
@@ -3339,8 +3332,6 @@ xlog_do_recover(
33393332 }
33403333 mp -> m_alloc_set_aside = xfs_alloc_set_aside (mp );
33413334
3342- xlog_recover_check_summary (log );
3343-
33443335 /* Normal transactions can now occur */
33453336 clear_bit (XLOG_ACTIVE_RECOVERY , & log -> l_opstate );
33463337 return 0 ;
@@ -3483,7 +3474,6 @@ xlog_recover_finish(
34833474 }
34843475
34853476 xlog_recover_process_iunlinks (log );
3486- xlog_recover_check_summary (log );
34873477
34883478 /*
34893479 * Recover any CoW staging blocks that are still referenced by the
@@ -3517,52 +3507,3 @@ xlog_recover_cancel(
35173507 xlog_recover_cancel_intents (log );
35183508}
35193509
3520- #if defined(DEBUG )
3521- /*
3522- * Read all of the agf and agi counters and check that they
3523- * are consistent with the superblock counters.
3524- */
3525- STATIC void
3526- xlog_recover_check_summary (
3527- struct xlog * log )
3528- {
3529- struct xfs_mount * mp = log -> l_mp ;
3530- struct xfs_perag * pag ;
3531- struct xfs_buf * agfbp ;
3532- struct xfs_buf * agibp ;
3533- xfs_agnumber_t agno ;
3534- uint64_t freeblks ;
3535- uint64_t itotal ;
3536- uint64_t ifree ;
3537- int error ;
3538-
3539- freeblks = 0LL ;
3540- itotal = 0LL ;
3541- ifree = 0LL ;
3542- for_each_perag (mp , agno , pag ) {
3543- error = xfs_read_agf (mp , NULL , pag -> pag_agno , 0 , & agfbp );
3544- if (error ) {
3545- xfs_alert (mp , "%s agf read failed agno %d error %d" ,
3546- __func__ , pag -> pag_agno , error );
3547- } else {
3548- struct xfs_agf * agfp = agfbp -> b_addr ;
3549-
3550- freeblks += be32_to_cpu (agfp -> agf_freeblks ) +
3551- be32_to_cpu (agfp -> agf_flcount );
3552- xfs_buf_relse (agfbp );
3553- }
3554-
3555- error = xfs_read_agi (mp , NULL , pag -> pag_agno , & agibp );
3556- if (error ) {
3557- xfs_alert (mp , "%s agi read failed agno %d error %d" ,
3558- __func__ , pag -> pag_agno , error );
3559- } else {
3560- struct xfs_agi * agi = agibp -> b_addr ;
3561-
3562- itotal += be32_to_cpu (agi -> agi_count );
3563- ifree += be32_to_cpu (agi -> agi_freecount );
3564- xfs_buf_relse (agibp );
3565- }
3566- }
3567- }
3568- #endif /* DEBUG */
0 commit comments