]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: add realtime rmap btree block detection to log recovery
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 May 2024 04:11:51 +0000 (21:11 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 07:35:31 +0000 (09:35 +0200)
Identify rtrmapbt blocks in the log correctly so that we can
validate them during log recovery.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_buf_item_recover.c

index 36c5e4d7f65bfacdb7650499e5f7b1646dfd4ce2..7d48b5f685791941fed0f3381d20dd20be0c6079 100644 (file)
@@ -259,6 +259,9 @@ xlog_recover_validate_buf_type(
                case XFS_BMAP_MAGIC:
                        bp->b_ops = &xfs_bmbt_buf_ops;
                        break;
+               case XFS_RTRMAP_CRC_MAGIC:
+                       bp->b_ops = &xfs_rtrmapbt_buf_ops;
+                       break;
                case XFS_RMAP_CRC_MAGIC:
                        bp->b_ops = &xfs_rmapbt_buf_ops;
                        break;
@@ -768,6 +771,7 @@ xlog_recover_get_buf_lsn(
                uuid = &btb->bb_u.s.bb_uuid;
                break;
        }
+       case XFS_RTRMAP_CRC_MAGIC:
        case XFS_BMAP_CRC_MAGIC:
        case XFS_BMAP_MAGIC: {
                struct xfs_btree_block *btb = blk;