@@ -159,6 +159,9 @@ block_to_bt(
case TYP_REFCBT:
magic = crc ? XFS_REFC_CRC_MAGIC : 0;
break;
+ case TYP_RTREFCBT:
+ magic = crc ? XFS_RTREFC_CRC_MAGIC : 0;
+ break;
default:
ASSERT(0);
}
@@ -447,7 +447,8 @@ is_btree_inode(void)
struct xfs_dinode *dip;
dip = iocur_top->data;
- return dip->di_format == XFS_DINODE_FMT_RMAP;
+ return dip->di_format == XFS_DINODE_FMT_RMAP ||
+ dip->di_format == XFS_DINODE_FMT_REFCOUNT;
}
static int
@@ -457,6 +458,7 @@ dump_btree_inode(
char *prefix;
struct xfs_dinode *dip;
struct xfs_rtrmap_root *rtrmap;
+ struct xfs_rtrefcount_root *rtrefc;
int level;
int numrecs;
int ret;
@@ -469,6 +471,12 @@ dump_btree_inode(
level = be16_to_cpu(rtrmap->bb_level);
numrecs = be16_to_cpu(rtrmap->bb_numrecs);
break;
+ case XFS_DINODE_FMT_REFCOUNT:
+ prefix = "u3.rtrefcbt";
+ rtrefc = (struct xfs_rtrefcount_root *)XFS_DFORK_DPTR(dip);
+ level = be16_to_cpu(rtrefc->bb_level);
+ numrecs = be16_to_cpu(rtrefc->bb_numrecs);
+ break;
default:
dbprintf("Unknown metadata inode type %u\n", dip->di_format);
return 0;
@@ -550,6 +558,7 @@ btdump_f(
case TYP_BMAPBTA:
case TYP_BMAPBTD:
case TYP_RTRMAPBT:
+ case TYP_RTREFCBT:
return dump_btree_long(iflag);
case TYP_INODE:
if (is_btree_inode())
@@ -58,6 +58,11 @@ struct btmap {
.maxlevels = libxfs_rtrmapbt_maxlevels_ondisk,
.maxrecs = libxfs_rtrmapbt_maxrecs,
},
+ {
+ .tag = "rtrefcountbt",
+ .maxlevels = libxfs_rtrefcountbt_maxlevels_ondisk,
+ .maxrecs = libxfs_rtrefcountbt_maxrecs,
+ },
};
static void
@@ -295,6 +295,7 @@
#define xfs_rtrefcountbt_create_path libxfs_rtrefcountbt_create_path
#define xfs_rtrefcountbt_droot_maxrecs libxfs_rtrefcountbt_droot_maxrecs
+#define xfs_rtrefcountbt_maxlevels_ondisk libxfs_rtrefcountbt_maxlevels_ondisk
#define xfs_rtrefcountbt_maxrecs libxfs_rtrefcountbt_maxrecs
#define xfs_rtrmapbt_calc_reserves libxfs_rtrmapbt_calc_reserves
@@ -455,6 +455,7 @@ The supported btree types are:
.IR bmapbt ,
.IR refcountbt ,
.IR rmapbt ,
+.IR rtrefcountbt ,
and
.IR rtrmapbt .
The magic value