]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: add realtime refcount btree block detection to log recovery
authorDarrick J. Wong <djwong@kernel.org>
Tue, 15 Oct 2024 19:40:18 +0000 (12:40 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:47:08 +0000 (13:47 -0700)
Identify rt refcount btree 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 4f2e4ea29e1f574151b9eabea96fae4e37e28471..b05d5b81f642daf12f6936d478f8c90ccb875b71 100644 (file)
@@ -271,6 +271,9 @@ xlog_recover_validate_buf_type(
                case XFS_REFC_CRC_MAGIC:
                        bp->b_ops = &xfs_refcountbt_buf_ops;
                        break;
+               case XFS_RTREFC_CRC_MAGIC:
+                       bp->b_ops = &xfs_rtrefcountbt_buf_ops;
+                       break;
                default:
                        warnmsg = "Bad btree block magic!";
                        break;
@@ -859,6 +862,7 @@ xlog_recover_get_buf_lsn(
                break;
        }
        case XFS_RTRMAP_CRC_MAGIC:
+       case XFS_RTREFC_CRC_MAGIC:
        case XFS_BMAP_CRC_MAGIC:
        case XFS_BMAP_MAGIC: {
                struct xfs_btree_block *btb = blk;