Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175276
b: refs/heads/master
c: fc5bc4c
h: refs/heads/master
v: v3
  • Loading branch information
Andy Poling authored and Alex Elder committed Dec 11, 2009
1 parent 171a856 commit 991abba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ec4fabb02fcb5b4a4154a27e4299af5aa0f87ac
refs/heads/master: fc5bc4c85c45f0bf854404e5736aa8b65720a18d
24 changes: 7 additions & 17 deletions trunk/fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -3517,7 +3517,7 @@ xlog_do_recovery_pass(
{
xlog_rec_header_t *rhead;
xfs_daddr_t blk_no;
xfs_caddr_t bufaddr, offset;
xfs_caddr_t offset;
xfs_buf_t *hbp, *dbp;
int error = 0, h_size;
int bblks, split_bblks;
Expand Down Expand Up @@ -3610,7 +3610,7 @@ xlog_do_recovery_pass(
/*
* Check for header wrapping around physical end-of-log
*/
offset = NULL;
offset = XFS_BUF_PTR(hbp);
split_hblks = 0;
wrapped_hblks = 0;
if (blk_no + hblks <= log->l_logBBsize) {
Expand Down Expand Up @@ -3646,9 +3646,8 @@ xlog_do_recovery_pass(
* - order is important.
*/
wrapped_hblks = hblks - split_hblks;
bufaddr = XFS_BUF_PTR(hbp);
error = XFS_BUF_SET_PTR(hbp,
bufaddr + BBTOB(split_hblks),
offset + BBTOB(split_hblks),
BBTOB(hblks - split_hblks));
if (error)
goto bread_err2;
Expand All @@ -3658,14 +3657,10 @@ xlog_do_recovery_pass(
if (error)
goto bread_err2;

error = XFS_BUF_SET_PTR(hbp, bufaddr,
error = XFS_BUF_SET_PTR(hbp, offset,
BBTOB(hblks));
if (error)
goto bread_err2;

if (!offset)
offset = xlog_align(log, 0,
wrapped_hblks, hbp);
}
rhead = (xlog_rec_header_t *)offset;
error = xlog_valid_rec_header(log, rhead,
Expand All @@ -3685,7 +3680,7 @@ xlog_do_recovery_pass(
} else {
/* This log record is split across the
* physical end of log */
offset = NULL;
offset = XFS_BUF_PTR(dbp);
split_bblks = 0;
if (blk_no != log->l_logBBsize) {
/* some data is before the physical
Expand Down Expand Up @@ -3714,9 +3709,8 @@ xlog_do_recovery_pass(
* _first_, then the log start (LR header end)
* - order is important.
*/
bufaddr = XFS_BUF_PTR(dbp);
error = XFS_BUF_SET_PTR(dbp,
bufaddr + BBTOB(split_bblks),
offset + BBTOB(split_bblks),
BBTOB(bblks - split_bblks));
if (error)
goto bread_err2;
Expand All @@ -3727,13 +3721,9 @@ xlog_do_recovery_pass(
if (error)
goto bread_err2;

error = XFS_BUF_SET_PTR(dbp, bufaddr, h_size);
error = XFS_BUF_SET_PTR(dbp, offset, h_size);
if (error)
goto bread_err2;

if (!offset)
offset = xlog_align(log, wrapped_hblks,
bblks - split_bblks, dbp);
}
xlog_unpack_data(rhead, offset, log);
if ((error = xlog_recover_process_data(log, rhash,
Expand Down

0 comments on commit 991abba

Please sign in to comment.