Commit a650e8f9 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Dave Chinner

xfs: add rmap btree block detection to log recovery

Originally-From: Dave Chinner <dchinner@redhat.com>

So such blocks can be correctly identified and have their operations
structures attached to validate recovery has not resulted in a
correct block.
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 5d650e90
...@@ -2231,6 +2231,7 @@ xlog_recover_get_buf_lsn( ...@@ -2231,6 +2231,7 @@ xlog_recover_get_buf_lsn(
case XFS_ABTC_CRC_MAGIC: case XFS_ABTC_CRC_MAGIC:
case XFS_ABTB_MAGIC: case XFS_ABTB_MAGIC:
case XFS_ABTC_MAGIC: case XFS_ABTC_MAGIC:
case XFS_RMAP_CRC_MAGIC:
case XFS_IBT_CRC_MAGIC: case XFS_IBT_CRC_MAGIC:
case XFS_IBT_MAGIC: { case XFS_IBT_MAGIC: {
struct xfs_btree_block *btb = blk; struct xfs_btree_block *btb = blk;
...@@ -2399,6 +2400,9 @@ xlog_recover_validate_buf_type( ...@@ -2399,6 +2400,9 @@ xlog_recover_validate_buf_type(
case XFS_BMAP_MAGIC: case XFS_BMAP_MAGIC:
bp->b_ops = &xfs_bmbt_buf_ops; bp->b_ops = &xfs_bmbt_buf_ops;
break; break;
case XFS_RMAP_CRC_MAGIC:
bp->b_ops = &xfs_rmapbt_buf_ops;
break;
default: default:
xfs_warn(mp, "Bad btree block magic!"); xfs_warn(mp, "Bad btree block magic!");
ASSERT(0); ASSERT(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment