xfs: add refcount btree block detection to log recovery
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:23 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:23 +0000 (09:11 -0700)
Identify refcountbt blocks in the log correctly so that we can
validate them during log recovery.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_log_recover.c

index 7def6723b8574a3a0c2cf5481c22983215f9f4fe..622881a5231576b150478c20b2cbf190a94894ea 100644 (file)
@@ -2245,6 +2245,7 @@ xlog_recover_get_buf_lsn(
        case XFS_ABTB_MAGIC:
        case XFS_ABTC_MAGIC:
        case XFS_RMAP_CRC_MAGIC:
+       case XFS_REFC_CRC_MAGIC:
        case XFS_IBT_CRC_MAGIC:
        case XFS_IBT_MAGIC: {
                struct xfs_btree_block *btb = blk;
@@ -2418,6 +2419,9 @@ xlog_recover_validate_buf_type(
                case XFS_RMAP_CRC_MAGIC:
                        bp->b_ops = &xfs_rmapbt_buf_ops;
                        break;
+               case XFS_REFC_CRC_MAGIC:
+                       bp->b_ops = &xfs_refcountbt_buf_ops;
+                       break;
                default:
                        warnmsg = "Bad btree block magic!";
                        break;