]> 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>
Thu, 15 Aug 2024 18:49:21 +0000 (11:49 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Sep 2024 08:48:23 +0000 (10:48 +0200)
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 a313056cb79f46fa7789a7776ff423a714ae6d66..904f69be7448693c4f588e62f8d4ac22a2e5ac4d 100644 (file)
@@ -268,6 +268,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;
@@ -772,6 +775,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;