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>
This commit is contained in:
Christoph Hellwig 2010-04-20 17:02:50 +10:00 committed by Alex Elder
parent 8112e9dc6d
commit 1414a6046a
3 changed files with 0 additions and 82 deletions

View file

@ -1331,9 +1331,6 @@ xfs_qm_qino_alloc(
*/
spin_lock(&mp->m_sb_lock);
if (flags & XFS_QMOPT_SBVERSION) {
#if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)
unsigned oldv = mp->m_sb.sb_versionnum;
#endif
ASSERT(!xfs_sb_version_hasquota(&mp->m_sb));
ASSERT((sbfields & (XFS_SB_VERSIONNUM | XFS_SB_UQUOTINO |
XFS_SB_GQUOTINO | XFS_SB_QFLAGS)) ==
@ -1346,11 +1343,6 @@ xfs_qm_qino_alloc(
/* qflags will get updated _after_ quotacheck */
mp->m_sb.sb_qflags = 0;
#if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)
cmn_err(CE_NOTE,
"Old superblock version %x, converting to %x.",
oldv, mp->m_sb.sb_versionnum);
#endif
}
if (flags & XFS_QMOPT_UQUOTA)
mp->m_sb.sb_uquotino = (*ip)->i_ino;

View file

@ -3394,42 +3394,6 @@ xlog_pack_data(
}
}
#if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)
STATIC void
xlog_unpack_data_checksum(
xlog_rec_header_t *rhead,
xfs_caddr_t dp,
xlog_t *log)
{
__be32 *up = (__be32 *)dp;
uint chksum = 0;
int i;
/* divide length by 4 to get # words */
for (i=0; i < be32_to_cpu(rhead->h_len) >> 2; i++) {
chksum ^= be32_to_cpu(*up);
up++;
}
if (chksum != be32_to_cpu(rhead->h_chksum)) {
if (rhead->h_chksum ||
((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) {
cmn_err(CE_DEBUG,
"XFS: LogR chksum mismatch: was (0x%x) is (0x%x)\n",
be32_to_cpu(rhead->h_chksum), chksum);
cmn_err(CE_DEBUG,
"XFS: Disregard message if filesystem was created with non-DEBUG kernel");
if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) {
cmn_err(CE_DEBUG,
"XFS: LogR this is a LogV2 filesystem\n");
}
log->l_flags |= XLOG_CHKSUM_MISMATCH;
}
}
}
#else
#define xlog_unpack_data_checksum(rhead, dp, log)
#endif
STATIC void
xlog_unpack_data(
xlog_rec_header_t *rhead,
@ -3453,8 +3417,6 @@ xlog_unpack_data(
dp += BBSIZE;
}
}
xlog_unpack_data_checksum(rhead, dp, log);
}
STATIC int
@ -4009,10 +3971,6 @@ xlog_recover_check_summary(
xfs_agf_t *agfp;
xfs_buf_t *agfbp;
xfs_buf_t *agibp;
xfs_buf_t *sbbp;
#ifdef XFS_LOUD_RECOVERY
xfs_sb_t *sbp;
#endif
xfs_agnumber_t agno;
__uint64_t freeblks;
__uint64_t itotal;
@ -4047,30 +4005,5 @@ xlog_recover_check_summary(
xfs_buf_relse(agibp);
}
}
sbbp = xfs_getsb(mp, 0);
#ifdef XFS_LOUD_RECOVERY
sbp = &mp->m_sb;
xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(sbbp));
cmn_err(CE_NOTE,
"xlog_recover_check_summary: sb_icount %Lu itotal %Lu",
sbp->sb_icount, itotal);
cmn_err(CE_NOTE,
"xlog_recover_check_summary: sb_ifree %Lu itotal %Lu",
sbp->sb_ifree, ifree);
cmn_err(CE_NOTE,
"xlog_recover_check_summary: sb_fdblocks %Lu freeblks %Lu",
sbp->sb_fdblocks, freeblks);
#if 0
/*
* This is turned off until I account for the allocation
* btree blocks which live in free space.
*/
ASSERT(sbp->sb_icount == itotal);
ASSERT(sbp->sb_ifree == ifree);
ASSERT(sbp->sb_fdblocks == freeblks);
#endif
#endif
xfs_buf_relse(sbbp);
}
#endif /* DEBUG */

View file

@ -1405,13 +1405,6 @@ xfs_mountfs(
xfs_qm_mount_quotas(mp);
}
#if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)
if (XFS_IS_QUOTA_ON(mp))
xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas turned on");
else
xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas not turned on");
#endif
/*
* Now we are mounted, reserve a small amount of unused space for
* privileged transactions. This is needed so that transaction