@@ -725,7 +725,7 @@ static avl64ops_t avl64_extent_tree_ops = {
void
incore_ext_init(xfs_mount_t *mp)
{
- xfs_agnumber_t agcount = mp->m_sb.sb_agcount + mp->m_sb.sb_rgcount;
+ xfs_agnumber_t agcount = mp->m_sb.sb_agcount;
int i;
pthread_mutex_init(&rt_ext_tree_lock, NULL);
@@ -778,10 +778,9 @@ incore_ext_init(xfs_mount_t *mp)
void
incore_ext_teardown(xfs_mount_t *mp)
{
- xfs_agnumber_t agcount = mp->m_sb.sb_agcount + mp->m_sb.sb_rgcount;
xfs_agnumber_t i;
- for (i = 0; i < agcount; i++) {
+ for (i = 0; i < mp->m_sb.sb_agcount; i++) {
btree_destroy(dup_extent_trees[i]);
free(extent_bno_ptrs[i]);
free(extent_bcnt_ptrs[i]);
@@ -322,8 +322,12 @@ _("free space (%u,%u-%u) only seen by one free space btree\n"),
case XR_E_FS_MAP:
break;
case XR_E_MULT:
- add_dup_extent(agno + isrt ? mp->m_sb.sb_agcount : 0,
- agbno, blen);
+ /*
+ * Nothing is searching for duplicate RT extents, so
+ * don't bother tracking them.
+ */
+ if (!isrt)
+ add_dup_extent(agno, agbno, blen);
break;
case XR_E_BAD_STATE:
default: