Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377104
b: refs/heads/master
c: d302cf1
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Jun 14, 2013
1 parent c020470 commit acb241b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 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: 088c9f67c3f53339d2bc20b42a9cb904901fdc5d
refs/heads/master: d302cf1d316dca5f567e89872cf5d475c9a55f74
19 changes: 17 additions & 2 deletions trunk/fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,13 @@ xlog_recover_do_inode_buffer(
xfs_agino_t *buffer_nextp;

trace_xfs_log_recover_buf_inode_buf(mp->m_log, buf_f);
bp->b_ops = &xfs_inode_buf_ops;

/*
* Post recovery validation only works properly on CRC enabled
* filesystems.
*/
if (xfs_sb_version_hascrc(&mp->m_sb))
bp->b_ops = &xfs_inode_buf_ops;

inodes_per_buf = BBTOB(bp->b_io_length) >> mp->m_sb.sb_inodelog;
for (i = 0; i < inodes_per_buf; i++) {
Expand Down Expand Up @@ -2205,7 +2211,16 @@ xlog_recover_do_reg_buffer(
/* Shouldn't be any more regions */
ASSERT(i == item->ri_total);

xlog_recovery_validate_buf_type(mp, bp, buf_f);
/*
* We can only do post recovery validation on items on CRC enabled
* fielsystems as we need to know when the buffer was written to be able
* to determine if we should have replayed the item. If we replay old
* metadata over a newer buffer, then it will enter a temporarily
* inconsistent state resulting in verification failures. Hence for now
* just avoid the verification stage for non-crc filesystems
*/
if (xfs_sb_version_hascrc(&mp->m_sb))
xlog_recovery_validate_buf_type(mp, bp, buf_f);
}

/*
Expand Down

0 comments on commit acb241b

Please sign in to comment.