patch-2.4.26 linux-2.4.26/fs/xfs/xfs_log_recover.c
Next file: linux-2.4.26/fs/xfs/xfs_macros.c
Previous file: linux-2.4.26/fs/xfs/xfs_log_priv.h
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
2004-04-14 06:05:40.000000000 -0700
- Orig file:
linux-2.4.25/fs/xfs/xfs_log_recover.c
- Orig date:
2004-02-18 05:36:32.000000000 -0800
diff -urN linux-2.4.25/fs/xfs/xfs_log_recover.c linux-2.4.26/fs/xfs/xfs_log_recover.c
@@ -3416,6 +3416,7 @@
{
uint *up = (uint *)dp;
uint chksum = 0;
+ int i;
/* divide length by 4 to get # words */
for (i=0; i < INT_GET(rhead->h_len, ARCH_CONVERT) >> 2; i++) {
@@ -3476,7 +3477,7 @@
xlog_rec_header_t *rhead,
xfs_daddr_t blkno)
{
- int bblks;
+ int hlen;
if (unlikely(
(INT_GET(rhead->h_magicno, ARCH_CONVERT) !=
@@ -3495,8 +3496,8 @@
}
/* LR body must have data or it wouldn't have been written */
- bblks = INT_GET(rhead->h_len, ARCH_CONVERT);
- if (unlikely( bblks <= 0 || bblks > INT_MAX )) {
+ hlen = INT_GET(rhead->h_len, ARCH_CONVERT);
+ if (unlikely( hlen <= 0 || hlen > INT_MAX )) {
XFS_ERROR_REPORT("xlog_valid_rec_header(2)",
XFS_ERRLEVEL_LOW, log->l_mp);
return XFS_ERROR(EFSCORRUPTED);
@@ -3658,7 +3659,7 @@
error = xlog_bread(log, 0, wrapped_hblks, hbp);
if (error)
goto bread_err2;
- XFS_BUF_SET_PTR(hbp, bufaddr, hblks);
+ XFS_BUF_SET_PTR(hbp, bufaddr, BBTOB(hblks));
if (!offset)
offset = xlog_align(log, 0,
wrapped_hblks, hbp);
@@ -3716,8 +3717,7 @@
if ((error = xlog_bread(log, wrapped_hblks,
bblks - split_bblks, dbp)))
goto bread_err2;
- XFS_BUF_SET_PTR(dbp, bufaddr,
- XLOG_BIG_RECORD_BSIZE);
+ XFS_BUF_SET_PTR(dbp, bufaddr, h_size);
if (!offset)
offset = xlog_align(log, wrapped_hblks,
bblks - split_bblks, dbp);
@@ -4042,7 +4042,7 @@
XFS_FSS_TO_BB(mp, 1), 0);
if (XFS_BUF_ISERROR(agibp)) {
xfs_ioerror_alert("xlog_recover_check_summary(agi)",
- log->l_mp, agibp, agidaddr);
+ mp, agibp, agidaddr);
}
agip = XFS_BUF_TO_AGI(agibp);
ASSERT(XFS_AGI_MAGIC ==
@@ -4058,7 +4058,8 @@
sbbp = xfs_getsb(mp, 0);
#ifdef XFS_LOUD_RECOVERY
- sbp = XFS_BUF_TO_SBP(sbbp);
+ sbp = &mp->m_sb;
+ xfs_xlatesb(XFS_BUF_TO_SBP(sbbp), sbp, 1, ARCH_CONVERT, XFS_SB_ALL_BITS);
cmn_err(CE_NOTE,
"xlog_recover_check_summary: sb_icount %Lu itotal %Lu",
sbp->sb_icount, itotal);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)