diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-04-20 03:02:50 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-19 10:58:15 -0400 |
commit | 1414a6046ab402ac21545522270c32c576327eb9 (patch) | |
tree | 2e1364e818bef8a05cb442503e4224b7c7a9d6a4 /fs/xfs/xfs_log_recover.c | |
parent | 8112e9dc6d1494078122146647981bc02a452d6a (diff) |
xfs: remove dead XFS_LOUD_RECOVERY code
This can't be enabled through the build system and has been dead for
ages. Note that the CRC patches add back log checksumming, but the
code is quite different from the version removed here anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3bfff4220a74..e5b74db5d2e0 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -3394,42 +3394,6 @@ xlog_pack_data( | |||
3394 | } | 3394 | } |
3395 | } | 3395 | } |
3396 | 3396 | ||
3397 | #if defined(DEBUG) && defined(XFS_LOUD_RECOVERY) | ||
3398 | STATIC void | ||
3399 | xlog_unpack_data_checksum( | ||
3400 | xlog_rec_header_t *rhead, | ||
3401 | xfs_caddr_t dp, | ||
3402 | xlog_t *log) | ||
3403 | { | ||
3404 | __be32 *up = (__be32 *)dp; | ||
3405 | uint chksum = 0; | ||
3406 | int i; | ||
3407 | |||
3408 | /* divide length by 4 to get # words */ | ||
3409 | for (i=0; i < be32_to_cpu(rhead->h_len) >> 2; i++) { | ||
3410 | chksum ^= be32_to_cpu(*up); | ||
3411 | up++; | ||
3412 | } | ||
3413 | if (chksum != be32_to_cpu(rhead->h_chksum)) { | ||
3414 | if (rhead->h_chksum || | ||
3415 | ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) { | ||
3416 | cmn_err(CE_DEBUG, | ||
3417 | "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)\n", | ||
3418 | be32_to_cpu(rhead->h_chksum), chksum); | ||
3419 | cmn_err(CE_DEBUG, | ||
3420 | "XFS: Disregard message if filesystem was created with non-DEBUG kernel"); | ||
3421 | if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { | ||
3422 | cmn_err(CE_DEBUG, | ||
3423 | "XFS: LogR this is a LogV2 filesystem\n"); | ||
3424 | } | ||
3425 | log->l_flags |= XLOG_CHKSUM_MISMATCH; | ||
3426 | } | ||
3427 | } | ||
3428 | } | ||
3429 | #else | ||
3430 | #define xlog_unpack_data_checksum(rhead, dp, log) | ||
3431 | #endif | ||
3432 | |||
3433 | STATIC void | 3397 | STATIC void |
3434 | xlog_unpack_data( | 3398 | xlog_unpack_data( |
3435 | xlog_rec_header_t *rhead, | 3399 | xlog_rec_header_t *rhead, |
@@ -3453,8 +3417,6 @@ xlog_unpack_data( | |||
3453 | dp += BBSIZE; | 3417 | dp += BBSIZE; |
3454 | } | 3418 | } |
3455 | } | 3419 | } |
3456 | |||
3457 | xlog_unpack_data_checksum(rhead, dp, log); | ||
3458 | } | 3420 | } |
3459 | 3421 | ||
3460 | STATIC int | 3422 | STATIC int |
@@ -4009,10 +3971,6 @@ xlog_recover_check_summary( | |||
4009 | xfs_agf_t *agfp; | 3971 | xfs_agf_t *agfp; |
4010 | xfs_buf_t *agfbp; | 3972 | xfs_buf_t *agfbp; |
4011 | xfs_buf_t *agibp; | 3973 | xfs_buf_t *agibp; |
4012 | xfs_buf_t *sbbp; | ||
4013 | #ifdef XFS_LOUD_RECOVERY | ||
4014 | xfs_sb_t *sbp; | ||
4015 | #endif | ||
4016 | xfs_agnumber_t agno; | 3974 | xfs_agnumber_t agno; |
4017 | __uint64_t freeblks; | 3975 | __uint64_t freeblks; |
4018 | __uint64_t itotal; | 3976 | __uint64_t itotal; |
@@ -4047,30 +4005,5 @@ xlog_recover_check_summary( | |||
4047 | xfs_buf_relse(agibp); | 4005 | xfs_buf_relse(agibp); |
4048 | } | 4006 | } |
4049 | } | 4007 | } |
4050 | |||
4051 | sbbp = xfs_getsb(mp, 0); | ||
4052 | #ifdef XFS_LOUD_RECOVERY | ||
4053 | sbp = &mp->m_sb; | ||
4054 | xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(sbbp)); | ||
4055 | cmn_err(CE_NOTE, | ||
4056 | "xlog_recover_check_summary: sb_icount %Lu itotal %Lu", | ||
4057 | sbp->sb_icount, itotal); | ||
4058 | cmn_err(CE_NOTE, | ||
4059 | "xlog_recover_check_summary: sb_ifree %Lu itotal %Lu", | ||
4060 | sbp->sb_ifree, ifree); | ||
4061 | cmn_err(CE_NOTE, | ||
4062 | "xlog_recover_check_summary: sb_fdblocks %Lu freeblks %Lu", | ||
4063 | sbp->sb_fdblocks, freeblks); | ||
4064 | #if 0 | ||
4065 | /* | ||
4066 | * This is turned off until I account for the allocation | ||
4067 | * btree blocks which live in free space. | ||
4068 | */ | ||
4069 | ASSERT(sbp->sb_icount == itotal); | ||
4070 | ASSERT(sbp->sb_ifree == ifree); | ||
4071 | ASSERT(sbp->sb_fdblocks == freeblks); | ||
4072 | #endif | ||
4073 | #endif | ||
4074 | xfs_buf_relse(sbbp); | ||
4075 | } | 4008 | } |
4076 | #endif /* DEBUG */ | 4009 | #endif /* DEBUG */ |